# Roles and permissions

> Who can see, review and change what in VisualCI. Roles follow each person's permission on the linked GitHub or GitLab repositories, a project can restrict who approves, and project tokens upload.

Source: https://visualci.com/docs/reference/access/
All of VisualCI's documentation: https://visualci.com/llms.txt

Everyone in an organization has one of three roles. A project can then narrow who approves its changes (see
[Who can approve](#who-can-approve)), and project tokens, which CI uses, have their own rules.

| Role | Can |
| --- | --- |
| Admin | Everything a member can, plus the organization's name and slug, project settings (who can approve included), new and deleted projects, project tokens, billing and members. |
| Member | Send builds, comment, and review changes (approve, reject, accept a variant, ignore a change) in every project whose approval rules let them. |
| Read | See builds and snapshots. Changes nothing, and can't comment. |

What each can do, and where it's set:

| | Read | Member | Admin | Project token |
| --- | --- | --- | --- | --- |
| See builds, snapshots and diffs | Yes | Yes | Yes | Its project |
| Send builds | No | Yes | Yes | Its project |
| Comment and resolve threads | No | Yes | Yes | Its project |
| Approve, accept a variant, ignore a change | No | Unless the project's rules say no | Unless the project's rules say no | Only with **CI token can approve** on |
| Reject | No | Unless the project's rules say no | Unless the project's rules say no | Yes |
| Change project settings and who can approve | No | No | Yes | No |
| Make and delete project tokens, members, billing | No | No | Yes | No |

## Who can approve

By default every member with Write or Admin reviews every project's changes. An admin can narrow that per project, on
the project's **Settings** tab under **Who can approve** (or `update_project` over MCP), with one of two modes:

- **Everyone with Write** (`approvers_mode: "except"`, the default), with a **Can't approve** list (`cant_approve`):
  everyone reviews except the people on the list. Use it to hold back a few people, such as a new maintainer during
  their first weeks.
- **Only approvers** (`approvers_mode: "only"`), with an **Approvers** list (`approvers`): only the people and GitHub
  teams on it review. Use it when most of the people with access shouldn't approve, or when new maintainers should
  start read-only until someone adds them.

Each mode keeps its own list, so switching between them never turns one into the other. Lists name people by their
GitHub or GitLab login; the approvers list also takes GitHub teams as `@org/team`, which VisualCI checks live with its
GitHub App each time someone in the team reviews (the project must be linked to GitHub through the App). When two
members share a login (one on GitHub, one on GitLab), VisualCI asks which one you mean: write `github:bob` or
`gitlab:bob`. The lists are shown only to the project's members, even on a public project.

Someone a project's rules leave out reads its builds and comments, as before, but can't approve, reject, accept a
variant or ignore a change there, in the web app, the CLI or MCP. The build page says why in place of its review
buttons, and every refusal names who can approve:

```
only the project's approvers can review: alice, bob, @acme/visual-reviewers. You can read and comment; an admin can add you
```

The rules apply to admins too. On GitHub, Maintain makes a VisualCI admin, and most open source maintainers have it, so
a project can only narrow its approvers if admins can be left out. Admins still manage the lists, so an admin can take
themselves off one; but VisualCI refuses any change that would leave nobody able to approve. Every change is recorded
(who, when, before and after), and each person whose ability to approve changed gets an email.

The rules belong to the project and the person, not to the membership: when GitHub or GitLab changes someone's role,
or removes and re-adds them, they stay on whichever list they were on.

An approval a branch carries forward (the same content approved on an earlier build of the branch), or that a merged
pull request takes to its base branch, counts only while its approver may still approve there. One made by someone
who approves through a GitHub team only doesn't carry: their change waits for a review again. The same goes for a
project token's approvals once the project stops tokens approving.

The rules decide who approves, not what a build compares. Anyone who can upload sets each snapshot's own threshold and
ignored regions, and a build name or environment the default branch has never seen starts as its baseline, so the rules
don't stop CI from loosening what a build compares. Review changes to your tests' VisualCI settings as you would
changes to the tests.

### Example: five maintainers, three approve

An open source project has five maintainers, all with Maintain on GitHub, so all five are VisualCI admins. Only three
of them should approve visual changes:

1. Open the project's **Settings** tab, and under **Who can approve** choose **Only approvers**.
2. List the three: `ada`, `grace` and `linus`, one per line (or a GitHub team they're in, `@acme/visual-reviewers`).
3. Save. The other two maintainers get an email saying they can't approve there any more. They still see every build
   and comment, and as admins they can change the list again.

Over MCP, an agent with an admin's token does the same:

```json
{ "project": "acme/widgets", "approvers_mode": "only", "approvers": ["ada", "grace", "linus"] }
```

To hold back just two people instead, keep **Everyone with Write** and put those two on **Can't approve**.

## Project tokens

A project token (`vci_...`, for CI) belongs to one project. It sends builds, comments and rejects changes, but by
default it can't approve, accept a variant or ignore a change: people approve, in the web app or with their own token.
To let an agent in CI approve with the project token, an admin turns on **CI token can approve** (`tokens_can_approve`)
in the project's settings. A project token can't change settings, make tokens or see the organization's members.

## Access follows GitHub

Link a project to its repository on the project's **Settings** tab. The VisualCI GitHub App must be installed on the repository, and you must be its admin or maintainer on GitHub. A repository belongs to one organization (several of its projects may link it). If another organization has it linked, VisualCI says which, and as a maintainer you can move the link to yours with **Move it here** (`move_link` over MCP); that organization's admins get an email. VisualCI follows the repository by GitHub's own ID, so renaming or transferring it, or renaming the GitHub account it belongs to, keeps the link and its checks and pull request comments, and a new repository that takes the old name doesn't get it. The project's repository address follows the new name: at once when GitHub tells VisualCI, within the hour otherwise. Whoever linked it must stay a maintainer: VisualCI checks every hour and unlinks it, with a notice on the project, when they aren't. From then on, anyone who can reach that repository on GitHub gets the matching role when they sign in to VisualCI with GitHub:

| On GitHub | In VisualCI |
| --- | --- |
| Admin or maintain | Admin |
| Write | Member |
| Triage or read | Read |

A person's role is the highest that any linked repository gives them. Members of the GitHub organization get whatever its base permission gives them. Organization owners are admins of every repository, so they become admins.

When someone loses access on GitHub, they lose it here too. GitHub tells VisualCI when collaborators, teams or organization members change, and VisualCI rechecks everyone every hour as well.

## Access follows GitLab

A project linked to a GitLab repository works the same way, with GitLab's roles:

| On GitLab | In VisualCI |
| --- | --- |
| Owner or Maintainer | Admin |
| Developer | Member |
| Reporter | Read |
| Guest, Planner or Minimal access | No access |

GitLab doesn't tell VisualCI when someone's access changes, so a GitLab member's role is updated each time they sign in
to VisualCI with GitLab.

## Synced and invited members

Access that comes from GitHub or GitLab shows as **GitHub** or **GitLab** in the organization's member list. To change
it, change the person's permission on the repository: VisualCI can't override it, and the next sync would put it back.
Members who were invited, or who made the organization, keep the role an admin gave them, and GitHub or GitLab never
changes it. Either kind can be on a project's approval lists.

## Invitations

To add someone GitHub doesn't cover (a designer, a contractor, or anyone in an organization with no linked repository), an admin invites them by email address or GitHub login in the organization's **Members** section, choosing their role. They get an email, and the invitation waits in VisualCI until they accept or decline it (signed in with that verified email address or GitHub account): nobody joins an organization without saying so.

An organization can send 50 invitations a day, and one address can get 3 a day. An agent can do the same with the MCP tool `invite_member`. `get_organization` lists the members, each with their role and where their access came from. Members' email addresses are shown to admins only; everyone else sees names and logins.

## Several GitHub accounts

You can link more than one GitHub account to your VisualCI account on the **Account** page. Each one's repositories count. Signing in with a new GitHub account whose verified email address you already use signs you in to your existing account.

## Renaming an organization

An admin changes the organization's name or slug on its **Settings** page, or with `update_organization` over MCP or `PATCH /api/v1/organizations/{org}` with an admin's personal access token (see the [API reference](https://visualci.com/docs/reference/api.md)). The old slug keeps working for good: its pages and gallery URLs redirect to the new ones, and the CLI, API and MCP accept project names with either, so CI configuration, tokens and links that name the old slug don't break. No other organization can take the old slug.

## Deleting a project

An admin deletes a project at the bottom of its **Settings** tab, typing its name to confirm. It disappears at once: its pages and API answers are gone, its project tokens stop working, CI uploads to it are refused, and the VisualCI check on each open pull request's latest commit completes as neutral ("Project deleted"), even one that was failing, so those pull requests can merge. Its pull request comments are edited to say it was deleted. If branch protection requires the VisualCI check, remove it there, or new pull requests will wait for a check that never comes. Its name and repository are free straight away, so picking the repository again makes a fresh project. Its builds, snapshots and images are deleted for good 7 days later; until then, VisualCI support can restore it. Credits it used this month still count.

An agent can delete a project with the MCP tool `delete_project`, using an admin's own token (a project token can't), with the project's full name (`org/project`) as `confirm`.
