Syntax
|
<CARAVAN> Domain admin "This page can accessed by domain admin users only" </CARAVAN>
<CARAVAN> Domain admin|system|manager<br> "This page can be accessed by admin, system and Manager users only" </CARAVAN>
|
Text
|
The word "DOMAIN" is specific to Caravan and has no relation with your network domains.
Domain ADMIN is automatically generated when the Caravan Business Server is installed.
A Domain is like defining a Group. One or more caravan users can belong to a particular Domain. 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.
Once users are created and domain defined (also see Administration-->Caravan Inbuilt files -->Createuser.html) it is simple to assign these domain/users within your Caravan scripting language
Creation of Domain 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, by defining the username, userid and Domain (groups). You can give single or multiple domains with '|' delimiter
e.g admin|manager|staff. When you click on 'Create This User', DOMAINS (MANAGER|STAFF) ARE AUTOMATICALLY CREATED BY CARAVAN INTERNALLY AND KEPT TRACK OF. ADMIN DOMAIN IS INBUILT IN CARAVAN. No need to create separate domains.
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 Domain object within Caravan Scripting: Domain gives you 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>
With the help of Domain, you can take decisions to display say a particular type of menu only, options, screen layout etc. (Also check User object)
|
Sample
|
// following example displays different menu, depending on the user logged in under which domain. <caravan> domain admin|staff if domain="admin" //display one type of menu e.g Home|Patients|Clients elseif domain="STAFF" //display another type of menu e.g Home|Staff|Resources endif </caravan>
|
Quick Reference
|
|
Home
Back
|
|