# Users and roles

> Add team members, send welcome emails, set roles and fine-grained permissions, create your own roles, suspend accounts without deleting them and see who did what

Source: https://anasaki.live/docs/en/studio/users-roles

Anasaki Studio lets you bring a team in to look after the site and decide precisely what each person can do. The menus are in the **Settings** group: **Users**, **Roles**, **Activity log** and **My account**.

## Built-in roles

| Role | What it can do |
| --- | --- |
| Administrator | Everything, always (its permissions cannot be edited, so you never lock yourself out) |
| Editor | All content and the look of the site |
| Author | Write and publish their own posts |
| Contributor | Write posts that an editor publishes |
| Subscriber | Sign in and edit their own profile only |

## Adding a user

1. Go to **Users → Add user**
2. Enter the display name and email, choose the **role** and the admin language. Required fields are marked with *, and a field with a problem is highlighted with what to fix
3. Choose how the password is set:
   - Tick **Send a welcome email with a link to set a password** — the user gets an email with a link (valid for 3 days); set up email in Site settings → Email first
   - Or set a password yourself (at least 8 characters; **Generate** helps) and tell the user
4. Save

Extra personal details (first and last name, profile picture, website, bio) appear next to posts when the template includes them.

## Managing several users at once

Tick users in the list and use **With selected…**: change the role, activate, suspend or delete.

- **Suspend** — the account cannot sign in for now, without being deleted; reactivate it at any time
- **Delete user** — first choose who receives all of that account's content
- You cannot suspend, delete or change the role of your own account

## Your own roles

Go to **Roles** (or the 🛡 button on the Users page):

- Tick or untick each role's permissions, or **Create a role** such as &#34;Marketing&#34;
- Rename or delete built-in roles you don't use; users of a deleted role become **Subscribers**, and **Restore built-in roles** brings them back with their default permissions
- The **Subscriber** role cannot be deleted (its name and permissions can change)

### Permissions of the system

| Permission | Meaning |
| --- | --- |
| `read` | Sign in to the admin |
| `edit_own_posts` | Write/edit their own posts |
| `publish_posts` | Publish posts |
| `edit_others_posts` | Edit other people's posts (and pin posts) |
| `edit_pages` | Design pages, menus and templates |
| `upload_files` | Upload files |
| `manage_categories` | Manage categories |
| `unfiltered_html` | Use raw HTML / upload SVG |
| `manage_options` | Site settings and plugins |
| `manage_users` | Users, roles and the activity log |
| `view_stats` | See visitor statistics |
| `view_scripts` · `edit_scripts` · `publish_scripts` · `manage_scripts` | Site Code (view / edit / publish / settings) |
| `view_code_data` · `edit_code_data` | The code's database (view / edit) |

### Plugin permissions

Plugins that support it add permissions of their own — **Docs** has &#34;Write and edit docs / Publish docs / Manage the docs hub&#34;, **Analytics** has &#34;View statistics&#34;. They appear under **🔌 Plugin permissions** below the system's list, grouped by plugin.

- On install, a plugin gives its permissions to sensible roles (such as administrators and editors), and the install dialog lists them first — only roles this site actually has
- Tick or untick them per role; updating the plugin never gives back a permission you removed
- Administrators always have every permission, and uninstalling a plugin removes its permissions from every role

Admin pages that plugins or Site Code add without a permission of their own choose which roles may open them; administrators adjust that in **Site Code → Access**. If you write plugins, see how to declare permissions in [Plugin capabilities](/docs/en/developers/plugin-capabilities).

> [!WARNING]
> `publish_scripts` is as powerful as being an administrator, because published code acts for the system — give it only to people you trust (`edit_scripts` alone is safer: drafts still need someone who can publish). See [Site Code](/docs/en/developers/site-code).

## My account

Everyone edits their own details in **My account**: the admin language (each person picks their own), name, email, profile picture and password — changing the password or email asks for the current password.

The admin comes in 5 languages: ไทย, English, 日本語, 中文 and 한국어. Switch instantly with the language box in the top bar; it is remembered with your account (since 2.2.2). Plugin texts that lack a language show in English.

The **Tokens for tools** section on the same page creates tokens for the developer CLI. See [anasaki-code CLI](/docs/en/developers/cli).

## Activity log

Administrators (`manage_users`) see in **Activity log** (CMS 2.4.0) who did what, when and from which IP:

- Every create, edit, delete, publish, plugin activation, settings change and code change — made in the admin or with an API token (marked **API**)
- Successful and failed sign-ins, including when sign-in was paused after too many wrong passwords — useful to spot someone guessing passwords
- The name of what was changed is recorded before the change, so a deleted page still shows its title

Filter by topic (content, users, plugins, code…), search by name, email or IP, and show failures only. Lines are kept for 180 days.

> [!NOTE]
> The log never stores what was sent, passwords or keys — only what was done to what. Just viewing pages (read-only) is not logged.

## Forgotten password

Press **Forgot your password?** on the sign-in page and enter your email: a link to set a new password is sent (valid for 2 hours). Email must be set up first, and `SITE_URL` should be set so the link points at the real address. See [Site settings](/docs/en/studio/site-settings).

> [!NOTE]
> Changing a password also revokes all tool tokens of that account.
