in english whole site
Home·Programming·CSE CMS·How To·Control Access Rightsdeutsch·english·français
» Hits: 237345  (details)
» Distinct visits: 42331 (1 Hit/visit)
» Bots visits: 194050 (Hits: 81.8%)
» Your hits in this session: 1
Contact & CommentsMinimizeHigherLower
» Visitor's comments
» Contact
Control Access Rights
To set access rights to a folder, you need first to define users.

Defining users
Create a document in your root directory (directory where CSE_CMS.php resides) with the exact same name as the name given in ettings.php in the variable $CSE_USERLIST. Do not add any extension like .txt unless you add it also in the variable.
In this file, you define on each line 1 user:
username userpassword usergroup
The usergroup is just a number, which is negative for "administrator" that gets all access, and positive for registered users. Eah user must belong to exactly 1 group. Zero is not a valid group.
Assume that Albert and Bernard belong to the blue team, and Cornelia and Dominique to the red team. Emil is administrator (and referee). The resulting file may be:
Albert pass1 1
Bernard pass2 1
Cornelia pass3 2
Dominique pass4 2
Emil pass5 -1

Define access rights
By default, all folders and documents are visible for anybody.
Acces rights are folder-based, define the visibility of the folder itself and extend to the content of a folder and to all its subfolders.

To limit acces rights, add in the folder a document called CSE_lock. This document contains just the number of the usergroups allowed to access the content. Just type in the numbers separated by spaces.
So for example, the folder "blue team" will contain a CSE_lock document containing a 1.
The folder "red team" will contain a CSE_lock document containing a 2.
And the folder "red-blue exchange" will contain a CSE_lock document containing 1 2, thus being allowed for both groups.

Emil will have access to all of those folders, being an administrator.

You can register with username "demo" and password "demo", and you should see, in the main menu (and in the table of content on the right) a new folder "Restricted Access" appearing.
If you log off, the folder will dissapear again.
Made with CSE_CMS, © CSE, 2008-2021