# Giving a user roles

A role lets an account do one part of the administration. Roles are made once for the server, in [Access Roles](Prefs-Access.md), and given to accounts here: in the **Access** part of the [Admin](Users-Admin.md) tab of a user in the User Manager.

## Roles

| Part | What it does |
|---|---|
| **Roles on this user**, **Add** | the roles this account holds. **Add** picks from the roles of the server. You can give only roles that your own roles allow you to give. |
| **Also use the roles of the users this user inherits from** | on: the account also has the roles of its templates. It is on from the start. |
| **Inherited roles** | those roles, listed |

## Where the roles apply

Many grants in a role are marked "managed": they hold for "the users this person manages", without saying who that is. This card says it, for this account:

| Field | Takes | Means |
|---|---|---|
| **Users** | `all`, `conn:Group`, `group:Group/name`, `user:Group/name` | everybody, a whole connection group, the members of a [group](Users-Groups.md), or one user |
| **Jobs** | `all`, `folder:Folder/`, `job:Folder/Name` | every job, the jobs of a folder, or one job |
| **Storage** | `all`, `file:/path/`, `vfs:Group/user`, `profile:Name`, `host:name` | where this account may point users and jobs at: a folder on the server, a user's file system, a connection profile, a host |

Several entries are joined with `;`. One role, **User Manager**, so serves every team lead: each gets it with their own group here.

**Permissions taken away**, below, removes single permissions from what the roles give, for this account only.

## Effective access (as saved)

The result: every permission this account has, each with the role it comes from. "No permissions." for an ordinary user. It shows what is **saved**: after a change, save the user and look again.

## Test access

Asks the server one question about this account:

1. Choose a **Permission**.
2. Choose a target: **No target**, **User**, **Job**, **Path** or **URL**, and name it.
3. Press **Test**.

The answer is yes or no, with the reason: the role and grant that allow it, or what is missing. Use it instead of logging in as the person to try.

## Access tokens

The tokens this account has issued, for scripts and tools that call the server's API. A token can do what it was issued for and never more than its owner. They are listed here to be looked at and revoked. See [Access tokens with a time limit](Security-Roles-Tokens.md).

## Examples

| The person shall | Give | Where the roles apply |
|---|---|---|
| look after the accounts of the partners | User Manager | Users: `group:MainUsers/Partners` |
| also reset their passwords | User Manager, User Security Manager | the same |
| start and stop jobs of the finance folder | Job Operator | Jobs: `folder:Finance/` |
| read the log when something fails | Log Reader | nothing |
| do everything | Administrator | nothing |

An account with roles logs in to the admin apps like any administrator and sees only the apps and the parts its roles reach.
