Roles is a new feature available from Tiki 21 that makes Groups Management and Permissions setting easier. Think of Roles as a permissions template which you can apply to Categories. It can be used on its own or in conjunction with the older Workspace UI (which needs to be upgraded to make use of Roles without requiring manual adjustments), or in conjunction with the newer Templated Groups which is also introduced in Tiki 21.
For example, if you have 4 groups:
and 2 categories:
and you want to make it such that all Teachers can edit handouts but Students can only read the handouts. Without Roles, you would need to set permissions on each of the categories and imagine if you have many other classes such as Geography or History etc... it can be a lot of work. Also, what if you wanted to change the permissions?
With Roles, you can create a "Teacher" Role group and a "Student" Role group which acts as the permissions template for all Teachers and Students regardless of what subject it is for. Instead of setting category permissions for each of the groups, you simply set which group has the role of Teachers and of Students in that group and permissions will be auto-magically mapped.
Now, let us walk through how the above example is configured:
1. Create Role Groups
Create two groups, one "Teachers" and one "Students". Make sure that "Role Group" checkbox is selected for both.
You will note that if you try and put any users into Role Groups, you will be told that Role Groups can't have members. This is by design.
Note: if you apply any Global Permissions to a Role Group, they will work for included groups such as those below the same as non-Role groups. These are Global Permissions though, not Role Permissions which are set at the Category Parent level (see below)
2. Create Groups that Include the Role
Create the following 4 groups and include the Teacher or Student Role Group as the case may be:
3. Create some test users
Create some test users and put them in these groups for testing/demo purposes.
4. Create categories
Create a Handouts category with the sub-categories "Science Class Handouts" and "Math Class Handouts".
For the Handouts category, make sure you select the "Apply role permissions to sub-categories" and select both "Students" and "Teachers". By doing this, any permissions that you set on the Handouts category for "Students" and "Teachers" will apply equally to the respective Students and Teachers in each of the sub-categories.
5. Configure Role Permissions
Setup some role permissions for Handouts by editing the Permissions for the Handouts category. setting screen. For our example we will give tiki_p_edit for Teachers; and tiki_p_view for both Teachers and Students.
6. Create test wiki pages
Create a Science Class Handout and a Math Class Handout wiki pages and categorize them accordingly. Test with the demo users to ensure that everything is working as intended.