# Roles and permissions

> Only available with a Pro subscription on hosted Pages CMS.

By default, [collaborators](/docs/guides/collaborators/) can edit everything `.pages.yml` exposes, on every branch. Roles narrow that down: for example, "can edit blog posts on `main`, but can't delete them or touch anything else".

Roles apply to collaborators only. Managers, who are GitHub users with write access, always keep full access. Roles live in Pages CMS, not in `.pages.yml`.

## Create a role

1. Open the project and go to **Roles**.
2. Select **Add role** and give it a name, such as "Blog editors".
3. Turn on **Restrict branches** to pick specific branches. By default the role applies to every branch.
4. Turn on **Restrict permissions** and select the operations to allow under **Collections**, **Files**, **Media** and **Actions**. For a read-only blog, select only **View** for the posts collection.
5. Select **Save role**.

## Assign it

In **Collaborators**, invite someone or edit an existing collaborator. Remove **Full access**, select the roles they should have, and save. A collaborator with several roles gets everything any of them allows.

Existing role assignments continue to restrict access after [Pro ends](/docs/billing/#when-pro-ends). Managers can still remove collaborators. Changing roles or assigning a custom role to a new collaborator requires Pro.

Before deleting a collaborator's only role, assign them another role or remove them from the project.

**Full access** is the built-in collaborator role. It covers content, media and configured actions on every branch. Project settings, invitations and billing still require their respective management permissions.

## Permissions

- **Collections:** View, Create, Edit, Delete
- **Files:** View, Edit
- **Media:** View, Upload, Replace, Rename, Delete. Upload allows adding a new file. Grant both Upload and Replace to let someone overwrite an existing file in that library. Rename also permits moving a file within the library.
- **Actions:** View, Run, Cancel

- Any write permission includes **View**.
- **View** allows collaborators to see action history. **Run** also shows the button to start a workflow.
- Leaving **Restrict permissions** off grants every operation on the role's branches, including for resources added later.
- [`operations`](/docs/configuration/content/#operations) in `.pages.yml` still apply on top of roles.
- Roles can't restrict individual languages.

## Renaming and branches

Permissions are matched by each resource's `name` in `.pages.yml`. Changing a `label` is safe; changing a `name` leaves the old permission pointing at nothing. Grants for resources that aren't in the current configuration show as **Not in this branch**: review them after renaming or removing content.

**Show resources from** picks which branch's configuration lists the resources to choose from. It doesn't change which branches the role covers.
