mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
53354224fc
Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
43 lines
931 B
TypeScript
43 lines
931 B
TypeScript
import type {
|
|
ROOT_PERMISSION_TYPE,
|
|
PROJECT_PERMISSION_TYPE,
|
|
ENVIRONMENT_PERMISSION_TYPE,
|
|
} from '@server/util/constants';
|
|
|
|
export type PermissionType =
|
|
| typeof ROOT_PERMISSION_TYPE
|
|
| typeof PROJECT_PERMISSION_TYPE
|
|
| typeof ENVIRONMENT_PERMISSION_TYPE;
|
|
|
|
export interface IPermission {
|
|
name: string;
|
|
displayName: string;
|
|
type: PermissionType;
|
|
environment?: string;
|
|
}
|
|
|
|
export interface IPermissions {
|
|
root: IPermission[];
|
|
project: IPermission[];
|
|
environments: IProjectEnvironmentPermissions[];
|
|
}
|
|
|
|
export interface IProjectEnvironmentPermissions {
|
|
name: string;
|
|
permissions: IPermission[];
|
|
}
|
|
|
|
export interface ICheckedPermissions {
|
|
[key: string]: IPermission;
|
|
}
|
|
|
|
export interface IPermissionCategory {
|
|
label: string;
|
|
type: PermissionType;
|
|
permissions: IPermission[];
|
|
}
|
|
|
|
export interface IMatrixPermission extends IPermission {
|
|
hasPermission: boolean;
|
|
}
|