1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/frontend/src/interfaces/permissions.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

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;
}