-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
app/ide-desktop/lib/dashboard/src/utilities/permissions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/** @file Utilities for working with permissions. */ | ||
|
||
import * as permissions from 'enso-common/src/utilities/permissions' | ||
|
||
export * from 'enso-common/src/utilities/permissions' | ||
|
||
/** CSS classes for each permission. */ | ||
export const PERMISSION_CLASS_NAME: Readonly<Record<permissions.Permission, string>> = { | ||
[permissions.Permission.owner]: 'text-tag-text bg-permission-owner', | ||
[permissions.Permission.admin]: 'text-tag-text bg-permission-admin', | ||
[permissions.Permission.edit]: 'text-tag-text bg-permission-edit', | ||
[permissions.Permission.read]: 'text-tag-text bg-permission-read', | ||
[permissions.Permission.view]: 'text-tag-text-2 bg-permission-view', | ||
[permissions.Permission.delete]: 'text-tag-text bg-delete', | ||
} | ||
|
||
/** CSS classes for the docs permission. */ | ||
export const DOCS_CLASS_NAME = 'text-tag-text bg-permission-docs' | ||
/** CSS classes for the execute permission. */ | ||
export const EXEC_CLASS_NAME = 'text-tag-text bg-permission-exec' |