Skip to content

Roles Management

This feature allows to handle the roles of the application. Roles define how users can access different system resources. A given user can have multiple roles. Role are cumulative. With User Manager appjar you can create roles at runtime and assign them to users. This section of the documentation explains how an administrator can manage the roles of the application.

Roles Listing

When entering the view, the first feature shown is a listing view that displays all the available roles in the system and allows to apply certain filter to make things easier when dealing with many of them. The view is divided in two areas, the first one displays some filter components to reduce the visibility of roles in the grid that it is displayed below.

Roles Management List View

Roles Management List View

Filters

This part of the view displays a field for filtering the roles: the name text field.

When entering a text in the name text field only the roles that contains the entered text in their names will be displayed. As an example, if the user enters "adm" then the roles with name "administrator" and "admin" will be shown given that they contain the string "adm" in the name.

In the filter area, at the right, there is a button with the caption "New role". When clicking this button the role creation view will be displayed.

Roles grid

Bellow the filter area a grid containing the filtered roles is displayed. This grid will show the following columns:

  • Id: This column displays a numerical identification value of the role
  • Role name: This column displays the name of the role
  • Users with this role: This column displays the amount of users that contain this role
  • Groups containing this role: This column displays the amount of groups that contain this role
  • Link status: This column shows the status of the associated registration link of this role ("-", Active, Success and Expired)
  • Actions: This column shows a dropdown menu when clicked, displaying actions that can be executed on the user associated with the current row.

Actions

The actions that can be performed on each of the rows are the following:

  • Edit: Displays the role's edit view.
  • Create registration link: Opens the dialog for creating a registration link.
  • Delete: Displays a confirmation dialog with information of the current role (username, current status (availability), number of assigned roles and number of groups that the user belongs to), asking to confirm the deletion process. The deletion of the user is physical (will delete the user from the database).

Role Delete Confirmation Dialog

Role Delete Confirmation Dialog

This dialog allows creating a registration link that can be used to be shared to new users of the application that can register themselves and will be automatically added to the current role.

The dialog will display the selected role name and then a component to change the amount of days after the link will expire. Bellow the component a text displays the estimated date and time when the link will expire.

After that there is a read only text field with the link with the registration link.

The view presents a cancel button, to cancel the password reset link creation and a button that will persist the link and copy it to the clipboard so it can be shared with new users so they can register themselves.

Create Registration Link Dialog

Create Registration Link Dialog

Roles Creation

This dialog allows the creation of a new role. It contains a text field called "Role name". A valid name has to be entered in this text field. A valid role is a string of text different from the empty string, and it must be a unique name for the role. A validation error will be displayed if a role with the same name already exists.

After entering a valid name the button "Save" will persist the new role in the database. Clicking the "Cancel" button will disregard the changes and return to the Roles List View.

Role Creation Dialog

Role Creation Dialog

Roles Edition

This dialog allows the edition of an existing role. It contains a text field called "Role name". A valid name has to be entered in this text field. A valid role is a string of text different from the empty string, and it must be a unique name for the role. A validation error will be displayed if a role with the same name already exists.

After entering a valid name the button "Save" will persist the changes of this role in the database. Clicking the "Cancel" button will disregard the changes and return to the Roles List View.

The "Delete" button will show a confirmation dialog. If accepted it will physically delete the role from the database.

Role Edition Dialog

Role Edition Dialog