Syntax
|
<CARAVAN> user objectName e.g user x </CARAVAN>
|
Text
|
You can define unlimited users and assign to Domains (group) within Caravan.
No need to write complex code to create a security system for a Group of users to access particular pages or data. All this is inbuilt in Caravan and simple to use.
Creation of Users using Caravan Inbuilt file:
- Go to http://localhost:8182/caravan.html
- If not already logged in, login as administrator. (Please note that for security reasons, you will need to change your admin default password=password, before you can create a new user or define a domain. Change the password via http://localhost:8182/password.html).
- Click on 'Create A User' or go to http://localhost:8182/createuser.html.
- Create any new user, (Caravan User Management) by defining the username, userid and Domain (groups).
Example:
Username=John Abraham Userid=John Domain=admin|Marketing|Staff You can give single or multiple domains with '|' delimiter e.g admin|manager|staff. When you click on 'Create This User', DOMAINS (MARKETING|STAFF) ARE AUTOMATICALLY CREATED BY CARAVAN INTERNALLY AND KEPT TRACK OF. ADMIN DOMAIN IS INBUILT IN CARAVAN. No need to create separate domains. While creating a user, if a new domain is defined, caravan automatically creates it.
A new user is created and kept track by Caravan internally. To login: Userid = John password = password (default password=password)
The user John can access caravan.html, since he is a Admin Domain user and create new users if required.
Important Notes:
- When you run Caravan for the first time, there is by default always an Admin Domain User. The default password=password for the admin. You need to change the default password, to access Caravan Inbuilt pages to create a new user, create/modify/delete databases or tables, etc.
- You can define as many users as you want.
- Each user is automatically given a default password=password
- You can give Admin Domain rights to as many users as you want.
- Only Admin domain users can access Caravan inbuilt pages.
- You can have as many domains as you want. Domains are automatically created by Caravan, when it finds a new domain during user creation.
- One or multiple users can belong to one or multiple domains
Using User object within Caravan Scripting: You can define page level security, while executing Caravan Script page through a browser. You can restrict a user access to any html page (source files \templates folder). The user will be forced to login, before access to that page. Once logged in, all subsequent pages with same domain access, will be available to the user.
<CARAVAN> Domain admin<br> "This page can accessed by domain admin users only" </CARAVAN>
<CARAVAN> Domain admin|system<br> "This page can be accessed by admin and system users only" </CARAVAN> (Also check Domain object)
|
Sample
|
Example 1 <CARAVAN> User customer </CARAVAN>
Details of uid, username, password, link and domain; can be accessed only through an admin login. Details of uid and total are available to all.
Example 2 // To check the properties of a logged in user <CARAVAN> //check if the user has logged in if userinfo(uid) //create a user object test user test //set the user to admin test(userid)="admin" if test(uid)>"0" //display the user information "User ID : ";test(userid) "User name :";test(username) "User Domain :";test(domain) else "User does not exist" endif else //Prompt the user to login " You have not logged in." endif </CARAVAN>
|
Quick Reference
|
|
Properties
|
Uid
Userid
Username
Password
Link
Domain
Total
Add
Delete
|
Home
Back
|
|