From 9c9768f7c6e852d7d75c980b1a0cd15fa99bd0fc Mon Sep 17 00:00:00 2001 From: Kaz Date: Thu, 11 Jul 2024 09:35:53 -0700 Subject: [PATCH] Fix permissions style --- .../lib/common/src/utilities/permissions.ts | 15 --------------- .../lib/dashboard/src/utilities/permissions.ts | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/ide-desktop/lib/common/src/utilities/permissions.ts b/app/ide-desktop/lib/common/src/utilities/permissions.ts index 92c39e300b61..e81b1296b956 100644 --- a/app/ide-desktop/lib/common/src/utilities/permissions.ts +++ b/app/ide-desktop/lib/common/src/utilities/permissions.ts @@ -47,16 +47,6 @@ export enum Permission { delete = 'delete', } -/** CSS classes for each permission. */ -export const PERMISSION_CLASS_NAME: Readonly> = { - [Permission.owner]: 'text-tag-text bg-permission-owner', - [Permission.admin]: 'text-tag-text bg-permission-admin', - [Permission.edit]: 'text-tag-text bg-permission-edit', - [Permission.read]: 'text-tag-text bg-permission-read', - [Permission.view]: 'text-tag-text-2 bg-permission-view', - [Permission.delete]: 'text-tag-text bg-delete', -} - /** Precedences for each permission. A lower number means a higher priority. */ export const PERMISSION_PRECEDENCE: Readonly> = { // These are not magic numbers - they are just a sequence of numbers. @@ -86,11 +76,6 @@ export const PERMISSION_ACTION_PRECEDENCE: Readonly> = { [PermissionAction.own]: { type: Permission.owner }, diff --git a/app/ide-desktop/lib/dashboard/src/utilities/permissions.ts b/app/ide-desktop/lib/dashboard/src/utilities/permissions.ts index dad372e3eb97..dbbb15c56fff 100644 --- a/app/ide-desktop/lib/dashboard/src/utilities/permissions.ts +++ b/app/ide-desktop/lib/dashboard/src/utilities/permissions.ts @@ -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> = { + [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'