Source: https://rox.chat/kb/pt/for-admins/roles.html

> This article outlines the rules that dictate the powers users have over the main system objects on the Chat Platform depending on their role.

# Role and Access Rights Management System

This article outlines the rules that dictate the powers users have over the main system objects on the **Chat Platform** depending on their role.

In this version, there is a fixed list of roles:

  * Admin
  * Supervisor
  * Agent

## Main Rules for Department and Agent Visibility

  1. The department list is available to the administrator and the supervisor, but not to the regular agent. Moreover, the administrator can see the full list of departments, while the supervisor can only access the subordinated departments.

  1. Only the administrator has the right to disable a department; the supervisor does not have this right, even if they can edit the department.

  1. All roles: the administrator, the supervisor, and the regular agent, can access the agent list. An agent can see themselves, those who are not part of any department, and those who are in at least one common department with them. The supervisor can see all the same people, plus their subordinate agents.

  1. In the respective column of the agent list, all the departments that agents are part of should be displayed, as long as they share at least one common department with the agent who is logged into the service. This means that it will also display departments that the current agent is not a part of.

  1. In the respective column of the agent list, all the departments that agents are part of should be displayed, as long as they share at least one common department with the agent who is logged into the service. This means that it will also display departments that the current agent is not a part of.

  1. The lists (of departments or agents) might be incomplete, meaning that there might be objects in the system that are not displayed in the current context.

---

## Staff

Path to the page: **Menu -> Staff**. Below is a description of the rights users have on the page with the [list of all users](https://rox.chat/kb/pt/getting-started/registration-agent.html).

|Function|Administrator   | Supervisor  |  Agent | 
|---|---|---|---|
|Viewing the list and profiles of users   | Allowed to view all users  |Can see in the user list: <ul><li>themselves;</li><li>those who are not in any department;</li><li>those who are in at least one common department with them;</li><li>agents of subordinate departments.</li></ul> Detailed viewing of all settings is generally prohibited, conditions are similar to the "Editing" section. <p><p> If the system parameter `restricted_profiles` is set to `False` (by default), the "Profile" section is also available, where they can see their own settings.  | Can see in the user list: <ul><li>themselves;</li><li>those who are not in any department;</li><li>those who are in at least one common department with them;</li></ul> Detailed viewing of all settings is generally prohibited. <p><p> If the system parameter `restricted_profiles` is set to `False` (by default), they are allowed to view their own settings, and the "Profile" section is available where they can see the same settings.  |
|Creating new users   |Allowed   | Prohibited  | Prohibited  |
| Editing user profiles  |Allowed to perform all actions over users in the user list: edit, disable.   | <ul><li>Allowed to disable agents of subordinate departments, others are prohibited.</li><li>Allowed to edit only agents from their subordinate departments, including agent department priorities (if <a href="../for-admins/chat-assignment-modes.html#skillization">skillization</a> is enabled), but not other supervisors and administrators.</li><li>Prohibited from adding/removing departments for subordinate agents.</li><li>If the system parameter `restricted_profiles` is set to `False` (by default), they are also allowed to edit their own profile.</li><li>Cannot make a user an administrator or change the agent's department list.</li><li>Cannot promote others to supervisors/demote to agents (i.e., set/remove the feature of department subordination).</li></ul> In other words, the supervisor cannot change another user's role.  | Generally prohibited to edit and disable; if the `restricted_profiles` parameter is set to `False` (by default), they are allowed to edit themselves.  | 
| Deleting users | Allowed to delete everyone except themselves | Prohibited from deleting, including themselves | Prohibited from deleting, including themselves |


Note:

* No one can ever change the `isAdmin` attribute for themselves (promote themselves to administrator or demote back);

* If a specific action is unavailable to the logged-in user, its icon does not appear in the agent list;

* If a specific action is available but impossible (for example, it is impossible to disable an agent who is offline), then the icon appears semi-transparent (unclickable).


---

## Departments

Path to the page: **Menu -> Staff -> Departments**.

Below is a description of the rights users have on the **Departments** page.

| Function  | Administrator  |  Supervisor | Agent  |
|---|---|---|---|
|Viewing the list of departments   | Allowed to view all departments.  |Allowed to view only subordinate departments.   |Viewing department settings is prohibited, only allowed to receive the names of the departments of agents available for viewing.   |
| Creating departments  | Allowed  |Prohibited   |Prohibited   |
|Editing departments   | Allowed to edit all departments  | Allowed to edit only subordinate departments  | Prohibited  |
| Deleting (in this case, it means disabling with the option to enable again)| Allowed| Prohibited| Prohibited |


Note

* In the agent list, the agent's department lists are not filtered when giving the list to supervisors and regular agents (similar to the rules for department visibility).

* If supervisors have access to the department list, it only displays those departments that are available for them to edit; however, if a department includes a supervisor but is not subordinate, it is not included in the list.

---

## Response Templates

Below is described what actions with templates of different levels can be performed by users with different roles.
You can read more about templates in [this article](https://rox.chat/kb/pt/for-admins/tips.html).

| Function                             | Administrator                                                          | Supervisor                                                                   | Agent |
|:-------------------------------------|:-----------------------------------------------------------------------|:-----------------------------------------------------------------------------|:------|
| Viewing (using) templates            | Allowed to use all templates (global, team, personal).                 | Allowed to use all templates.                                                | Allowed to use all templates. |
| Creating templates                   | Allowed to create templates of all levels.                             | Allowed to create templates for subordinate departments and personal templates. | Allowed to create personal templates only. |
| Editing templates                    | Allowed to edit templates of all levels.                               | Allowed to edit templates for subordinate departments and personal templates.   | Allowed to edit personal templates only. |
| Deleting templates                   | Allowed to delete templates of all levels.                             | Allowed to delete templates for subordinate departments and personal templates.   | Allowed to delete personal templates only. |


---

## Online Statistics (Dashboard)

Below are the possibilities for using various functions in dialogues on the Agent's Workspace page depending on the user's role.

| Function  | Administrator  | Supervisor  | Agent  |
|---|---|---|---|
| Viewing the Dashboard  | Allowed to view the Dashboard with information on all agents, departments, and channels.  | Allowed to view the Dashboard only with information on subordinate departments and agents.  | Prohibited  |
| Editing  | Prohibited  | Prohibited  | Prohibited  |


## Dialogues (Requests)

Below, we outline the capabilities for using various functions in dialogues on the Agent Workspace page, depending on the user's role.

| Function                                                                                       | Administrator                                                           | Supervisor                                                                                                                                                         | Agent |
|:-----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------|
| Viewing dialogues                                                                              | Allowed to view all dialogues within the limits of displayed dialogues. | Allowed to view all their chats within the limits, and when the system parameter `hide_anothers_chats` is set to `False`, viewing others' dialogues is permitted. | Allowed to view all their chats within the limits, and when the system parameter `hide_anothers_chats` is set to `False`, viewing others' dialogues is permitted. |
| [Redirecting (transferring) chat](https://rox.chat/kb/pt/for-agents/online-work-with-visitors/redirect-dialog.html) | Allowed for all chats.                                                  | Allowed for their own chats.                                                                                                                                      | Allowed for their own chats. |
| Chat interception                                                                              | Allowed to intercept all chats.                                         | Allowed to intercept chats of agents who are in the visibility area.                                                                                              | Allowed to intercept chats of agents who are in the visibility area. |
| Chat interception                                                                              | Allowed to intercept all chats.                                         | Allowed to intercept chats of agents who are in the visibility area.                                                                                              | Allowed to intercept chats of agents who are in the visibility area. |
| [Blocking](https://rox.chat/kb/pt/for-agents/online-work-with-visitors/block-visitor.html)                          | Allowed to block visitors in all chats.                                 | Allowed to block visitors in their own dialogues.                                                                                                                 | Allowed to block visitors in their own dialogues. |
| [Closing](https://rox.chat/kb/pt/for-admins/closing-dialogs.html)                                                   | Allowed to close all chats.                                             | Allowed to close their own chats.                                                                                                                                 | Allowed to close their own chats. |

---

## Queues (general queue, offline requests)

Here we describe the capabilities of different users working with the [general queue](https://rox.chat/kb/pt/control-panel/sections.html#agent-workspace-description) and [offline requests](https://rox.chat/kb/pt/for-agents/work-with-offline-requests.html).

| Function        | Administrator                                                                               | Supervisor                                                                   | Agent |
|:----------------|:--------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------|:------|
| Viewing queues  | Always allowed. The number of chats visible in the queues is limited by global limits.    | Allowed if the system parameter `hide_common_queue` is set to `False` (default). | Allowed if the system parameter `hide_common_queue` is set to `False` (default). |
| Editing         | Prohibited                                                                                   | Prohibited                                                                   | Prohibited |

When the `hide_anothers_chats` parameter is set to `True` (default is `False`), regular agents have chats and chat fragments hidden on the Agent Workspace that were conducted by other agents.


---

## General Settings

Here we describe the capabilities of different users working with [general settings](https://rox.chat/kb/pt/control-panel/settings-general.html) (including communication channels).
Path to the general settings: **Menu -> Settings -> General**.

| Function          | Administrator                                   | Supervisor | Agent   |
|:------------------|:------------------------------------------------|:-----------|:--------|
| Viewing settings  | Allowed to view all settings.                   | Prohibited | Prohibited |
| Creating channels | Allowed to create all channels.                 | Prohibited | Prohibited |
| Editing           | Allowed to edit all settings and channels.      | Prohibited | Prohibited |
| Deleting channels | Allowed to delete all channels.                 | Prohibited | Prohibited |

---

## Dialogue History

Here we describe the ability of users to work with the [dialogue history](https://rox.chat/kb/pt/for-agents/agent-gui/view-dialog-history.html).
Path to the dialogue history: **Menu -> Dialogue History**.

| Function             | Administrator                                                           | Supervisor                                                                           | Agent |
|:---------------------|:------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:------|
| Viewing              | Allowed to view the history of all dialogues.                           | Allowed to view the history of their own dialogues and the dialogues of agents from subordinate departments. | Allowed to view the history of their own dialogues and the dialogues of agents visible to this agent (see above). The system parameter `hide_anothers_chats_in_history` hides the viewing of others' dialogues in the history, and `show_chats_from_other_departments_in_history` allows viewing dialogues of agents from other departments. |
| Reopening dialogues  | Allowed                                                                 | Allowed                                                                              | Allowed |
| Editing              | Prohibited                                                              | Prohibited                                                                           | Prohibited |
| Deleting             | Allowed if the system parameter `allow_chat_delete_for_admins` is set to `True`. | Prohibited                                                                           | Prohibited |
