| 1 | import { roleHierarchy } from "@ghost/permissions"; |
| 2 | |
| 3 | import type { components |
| 4 | |
| 5 | export type ViewerRole |
| 6 | export type CollaboratorRole |
| 7 | |
| 8 | /** Lowest to highest, as the API ranks them. */ |
| 9 | export const collaboratorRoles = |
| 10 | (role): role |
| 11 | ) as ["read |
| 12 | |
| 13 | /** Names for the pickers, organization roles included. */ |
| 14 | export const roleLabels: |
| 15 | read: "Read", |
| 16 | triage: "Triage", |
| 17 | write: "Write", |
| 18 | maintain: "Maintain", |
| 19 | admin: "Admin", |
| 20 | owner: "Owner", |
| 21 | }; |
| 22 | |
| 23 | export const roleDescriptions: |
| 24 | read: "View and clone, open issues and comment.", |
| 25 | triage: "Also close, label and assign issues and pull requests.", |
| 26 | write: "Also push, merge, and edit anyone's issues and comments.", |
| 27 | maintain: "Also change the name, description and default branch.", |
| 28 | admin: "Full access, including visibility, collaborators and deletion.", |
| 29 | }; |