# Roles and permissions

Roles belong to the workspace, not to a project or a map: a person's role applies to every project in the workspace. There are four roles, from the most rights to the fewest: Owner, Admin, Member and Viewer. To bring people in, see [Invite your team](/docs/invite-team/).

| | Owner | Admin | Member | Viewer |
| --- | --- | --- | --- | --- |
| See projects, maps and the Statistics page | Yes | Yes | Yes | Yes |
| Edit maps: steps, chapters, stories, criteria, releases | Yes | Yes | Yes | No |
| Create, rename and delete view tabs | Yes | Yes | Yes | No |
| Create and revoke the public link of a map | Yes | Yes | Yes | No |
| Add, edit and reorder stages | Yes | Yes | Yes | No |
| Delete stages | Yes | Yes | No | No |
| Be the assignee of a story | Yes | Yes | Yes | No |
| Invite people, change roles, remove members | Yes | Yes, except owners | No | No |
| Create agent keys | Yes | Yes | No | No |
| Restore from the trash | Yes | Yes | Yes, except stages, maps and projects | No |
| Empty the trash | Yes | Yes | No | No |
| Delete the workspace | Yes | No | No | No |
| Agent key changes the map | Yes | Yes | Yes, if they have one | No, it only reads |

## Owners and admins

A workspace can have several owners. Only an owner can change or remove another owner, and the only owner can be neither removed nor demoted. An admin manages admins, members and viewers but can't make anyone an owner. Anyone can leave a workspace except its only owner.

## Viewers

A viewer sees everything members see, without the controls that change the map. A viewer can still filter, group and change the Display settings of a view: the changes stay with them and nobody else sees them.

## Agent keys

An agent key opens one workspace and acts for the person who created it: changes made with it show on the card as that person's agent. Slicemap checks the key on every call: that it is still valid, that its owner is still a member, and what their role is now.

- A key created with "Read only" access never changes the map. A tool that writes is refused with `insufficient_permissions`.
- A key with "Read & write" access writes only while its owner can edit the map. Demoted to viewer, the same key only reads and writing tools are refused with `read_only_member`. Given edit rights back, the key writes again.
- When someone is removed from the workspace or leaves it, their keys for it stop working.
- Members can't create keys. A key someone created as an admin keeps writing after they become a member, because members edit maps.
- Each key can make up to 200 write calls an hour, refused ones included.

Through a key, the agent can do what its owner can do in the app: delete and restore, make a release active, change roles, invite people, share a map, create keys and rename the workspace, each with the owner's role. What it deletes goes to the [trash](/docs/how-to/trash/) for 30 days; erasing from the trash for good is left to people. It removes on its own what it created itself and deletes your work only when you ask.

See [Refusals](/docs/reference/refusals/) for every code the agent can get back.
