Roles

Description

The Roles module provides a simple interface to manage user roles. Privileges or access rights to the different Ambience modules can be grouped together into roles. Adding a user to a role collectively grants the privileges to the said user. This is particularly useful and makes it easy to maintain when there are two or more users requiring the same set of privileges.

Another option for assigning roles to existing users is to use the Users module. There is no difference in the effect of role assignments between assigning roles to users through the Users module and assigning users to roles through the Roles module.

Features

  • Add role
  • Edit role
  • Add and remove privilege
  • Add and remove user
  • Delete role
  • Refresh list
  • Search

Module Interfaces

Interface Description Required Privilege
Roles Allows adding, modifying and deleting roles. mod-roles

Add Role

To add a role, start by clicking on the “Add” button on the upper right corner of the page.

On the “Add” panel, set the new role’s properties, privileges and users.

Input Fields

Field Description Mandatory Input Type Constraints Default Value
Properties
Name Unique name assigned to the role that would be used as its identifier. Y Text field String made of alphanumeric characters and dashes (-) only.

Special characters such as punctuations, white spaces and other symbols are not allowed. The value must not exist in the current list. The value is case-sensitive.
Empty string
Description Description of the role. N Text field Any text Empty string
Privileges
Privileges List of privileges that are assigned to the role. N Checkbox Multiple values can be selected. All roles are listed as available options. No value selected
Users with this Role
Users with this Role List of users that are assigned to the role. N Checkbox Multiple values can be selected. All enabled users are listed as available options. No value selected

In the “Properties” section, key in the name to be given to the role into the “Name” field. Only the “Name” field is mandatory and it must be a unique value (not used by any other role).

In the “Privileges” and “Users with this Role” section, select the desired privileges and users by selecting the checkboxes in their respective sections. Alternatively, you can search for the privilege and/or role by using the search function at the top of their respective sections. There are options to select all, select none and invert selection by clicking on their respective icons next to the search function.

Click on the “Save” button located on the upper right corner of the “Add” panel to proceed with adding the new role. Clicking on the “Cancel” button aborts the action.

Edit Role

To modify an existing role’s attributes, click on the “Edit” icon under the “Actions” column corresponding the said role.

The “Edit” panel displays the selected role’s attributes. The same fields and constraints in Add Role are applied.

Click on the “Save” button located on the upper right corner of the “Add” panel to proceed with saving the changes made to the existing role. Clicking on the “Cancel” button aborts the action and retains the role’s attributes prior to opening the “Edit” panel.

Note that changes would only take effect upon the next login of the users who are affected (e.g. adding/removing of users, adding/removing of privileges of groups with assigned users). It is advised that the affected user logout then login again if the said user is logged in while the changes were being made.

Delete Role

Deleting a role removes it from the records, which means another role with the same name as the deleted role can be added.

To delete an existing role from Ambience, click on the “Delete” icon under the “Actions” column corresponding the said role.

There is an option to undo the deletion. A notification with an “Undo” button appears right after clicking on the “Delete” icon.

Upon clicking on the “Undo” button, the deleted role is restored and is added back to the list of roles.

Note that after successfully deleting a role, users assigned to this role would no longer have the privileges tagged to the role, unless the same privileges are tagged to the users as extra privileges. Changes would only take effect upon the next login of the users who are affected (e.g. adding/removing of users, adding/removing of privileges of groups with assigned users). It is advised that the affected user logout then login again if the said user is logged in while the changes were being made.

Refresh List

After performing actions (e.g. add role, delete role) on the browser window/tab, the list is reloaded to display the updated data. The manual “Refresh” button is available and is particularly useful if there are others making changes on the same page and/or the making changes to role assignments in the Users module.

The “Refresh” button is available on the upper right corner of the page. Clicking on it reloads the list of users.

Search

The search bar appears on the upper left corner of the page.

This provides an easy way to search through the role list. It is case-insensitive and displays records that have the entered search value in any of the values of the fields below:

  • Name
  • Description
  • Privileges