# Users

> A user is a person in your Vigil organization, from guards to owners. Invite users by email, SMS or link, give them roles, and remove them when they leave.

Source: https://vigilsecure.net/docs/concepts/users/

A user is a person. In Vigil a person has one account, and that account can belong to any
number of [organizations](https://vigilsecure.net/docs/concepts/organizations.md). What a person can do in your
organization is decided by the [roles](https://vigilsecure.net/docs/concepts/roles.md) you give them there.

"Guard" is a role, not a different kind of account. A guard, a supervisor and an owner are
all users.

You find them under **Directory → Users** in the console.

## The user list

The list shows everyone who is in your organization and everyone who has been invited but
has not joined yet.

- Each row shows the person's name, how they sign in (their email, or **Signs in by ID
  number** for a guard who joined on a device), their roles and a state: **Member** or
  **Invited**.
- Filter by **Members** or **Invited**, search by name and sort by name or by when they
  joined.

Seeing the list needs the **View members** permission, which every default role has.

## How people join

| Way                            | Who it suits                                            | How it works                                                                                                                                      |
| ------------------------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Invitation by email or SMS** | Managers, supervisors, control room                     | You send it from **Invite a user**. They sign in with that address or number and accept. Valid for 7 days.                                        |
| **Invite link**                | Somebody standing next to you, or a contact on WhatsApp | You create a link and send it yourself. It works once, for 15 minutes.                                                                            |
| **Sign-in on a device**        | Guards                                                  | The guard enters their South African ID number on a device linked to your organization, adds their name and photo, and joins with the guard role. |

[Set up your organization](https://vigilsecure.net/docs/setup/set-up-your-organization.md) walks through sending
invitations.

## A user's page

Open a user to see two tabs:

- **Profile**: when they joined and how they sign in.
- **Permissions**: their roles, and the full list of permissions those roles add up to.

### Change somebody's roles

1. Open the user and choose the **Permissions** tab, then **Edit roles**.
2. Select the roles they should have. Roles you clear are removed when you save.
3. Choose **Save roles**.

Two rules protect you from mistakes:

- You can only give permissions you hold yourself.
- You can only change the roles of somebody whose permissions you hold in full. A manager
  cannot edit an owner.

Changing roles needs the **Change member roles** permission, which the operator, manager,
admin and owner roles have. The change takes effect on the person's next action.

## Remove a user

Open the user and choose **Remove from organization**. They lose access to its sites, chats
and everything else in it straight away. What they wrote stays, with their name on it. To
come back, somebody has to invite them again.

People can also leave by themselves, from the list of organizations they see after signing
in. The last owner cannot leave until somebody else is an owner.

## What a user controls themselves

Each person manages their own account under **Account settings**: their name and photo,
the email address and mobile number their sign-in codes go to, their South African ID
document, and their [access tokens](https://vigilsecure.net/docs/setup/use-vigil-with-ai.md#step-1-create-an-access-token).
These follow them into every organization. An organization cannot change them.

## Users and agents

[Agents](https://vigilsecure.net/docs/concepts/agents.md) are members of your organization too, with roles of their
own, but they are listed separately under **Directory → Agents**. In chats, people and
agents appear side by side.

## Related

- [Roles and permissions](https://vigilsecure.net/docs/concepts/roles.md)
- [Frequently asked questions](https://vigilsecure.net/docs/faq.md#people-and-roles)
