Roles and permissions
Permissions in tmspec have two layers and one general principle: every credential belongs to a person.
Roles
You have a role in the workspace and, separately for each project, a role in the project.
| Level | Role | What it can do |
|---|---|---|
| Workspace | owner | Everything, including managing other owners. A workspace always keeps at least one owner |
| Workspace | admin | Manages members and projects; is admin in every project |
| Workspace | member | A member; has no right in any project until given a project role |
| Project | viewer | Reads specs, change requests and history; comments on change requests |
| Project | contributor | Like viewer, and proposes, edits, submits and withdraws their own change requests; writes implementation specs; adds tags |
| Project | reviewer | Like contributor, and approves, rejects or asks for changes on change requests |
| Project | admin | Like reviewer, and manages Areas, project settings and roles in the project |
A few things worth knowing:
- Workspace owners and admins are admins in every project, with no separate grant needed.
- Reviewers and admins can also approve a change request they proposed themselves, as long as they belong to the group that has to sign (see Area).
- The owner of a spec who has the contributor role or above in the project can also click Ready and retire that implementation spec, and confirm (No impact included) the links of that spec, even when they are not a reviewer.
- A person with no role in a project does not see that project: the answer is identical to the project not existing.
- Removing or lowering a role takes effect at the next request, even when that person still has an open session.
Credentials and scopes
You reach tmspec in three ways: signing in on the web, signing in with the CLI, or an API key (for agents, CI, scripts). All three are you. The real permission of a request is the intersection of two things:
the person's role ∩ the credential's scopes = real permission
Scopes only narrow, they never widen. A person's sign-in carries all 15 scopes, so their permission is their role. An API key carries exactly the scopes chosen when it was created; the default is read and propose.
| Group | Scope | Allows |
|---|---|---|
| Read | read:spec | Read specs, change requests, history |
| Read | read:workspace | Read the workspace and projects |
| Write | write:proposal | Propose change requests and retires |
| Write | write:comment | Comment on change requests |
| Write | write:wspec-draft | Create and edit implementation spec drafts |
| Write | write:link | Add and remove weak links |
| Write | write:tag | Add and remove tags and manage the tag catalogue |
| Write | write:verification | Record the verification of a criterion |
| Decide | decide:change-request | Approve, reject, ask for changes |
| Decide | decide:link | Confirm No impact |
| Decide | decide:wspec | Click Ready, retire an implementation spec |
| Manage | manage:item | Change a spec's owner and visibility |
| Manage | manage:project | Manage projects and Areas |
| Manage | manage:members | Manage members |
| Manage | manage:workspace | Manage the workspace, create projects |
Scopes are independent of each other: write:* does not imply read:*, and every key must have read:spec: the sign-in service refuses to create a key without it, even one that only has read:workspace. No scope allows creating or revoking an API key; that can only be done by your own sign-in on the web.
A decision always has a person's name
When an API key approves a change request, the record names the person who owns the key and the key that was used. There is no separate "agent": an agent works under the name of the person who gave it the key, within the scopes. So giving a key decide:* or manage:* lets the key do that on your behalf; the web warns you when you tick these scopes.
The answer when refused
| Situation | What you see |
|---|---|
| Not a member, or no role in the project | Not found (404), identical to the resource not existing |
| Role not enough | No permission (403) |
| Role enough but the key lacks a scope | No permission, with the name of the missing scope |
On the web, a button shows only when you can really do it. Through the API, each resource has an allowed_actions field that lists exactly what your role and scopes allow.