Reimplement remove / create in console
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -78,7 +78,7 @@ export {
|
||||
} from "./date";
|
||||
export { getTrustCenterUrl } from "./trustCenter";
|
||||
export { formatError, type GraphQLError } from "./error";
|
||||
export { Role, getAssignableRoles } from "./roles";
|
||||
export { Role, roles, getAssignableRoles } from "./roles";
|
||||
export {
|
||||
getTrustCenterDocumentAccessInfo,
|
||||
getTrustCenterDocumentAccessStatusBadgeVariant,
|
||||
|
||||
@@ -7,6 +7,13 @@ export const Role = {
|
||||
} as const
|
||||
|
||||
export type Role = (typeof Role)[keyof typeof Role];
|
||||
export const roles = [
|
||||
"OWNER",
|
||||
"ADMIN",
|
||||
"VIEWER",
|
||||
"AUDITOR",
|
||||
"EMPLOYEE",
|
||||
] as const
|
||||
|
||||
export function getAssignableRoles(currentRole: Role): Role[] {
|
||||
if (currentRole === Role.OWNER) {
|
||||
|
||||
Reference in New Issue
Block a user