mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
a9e9ae8c3e
https://linear.app/unleash/issue/2-1143/adapt-project-roles-to-use-the-new-role-selector-and-role-description This PR further unifies roles, by having a single `IRole` interface to cover both types, and re-using the same components for project roles.
19 lines
437 B
TypeScript
19 lines
437 B
TypeScript
import { ROOT_ROLE_TYPE, PROJECT_ROLE_TYPE } from '@server/util/constants';
|
|
import { IPermission } from './permissions';
|
|
|
|
export type PredefinedRoleType =
|
|
| typeof ROOT_ROLE_TYPE
|
|
| typeof PROJECT_ROLE_TYPE;
|
|
|
|
export interface IRole {
|
|
id: number;
|
|
name: string;
|
|
project: string | null;
|
|
description: string;
|
|
type: string;
|
|
}
|
|
|
|
export interface IRoleWithPermissions extends IRole {
|
|
permissions: IPermission[];
|
|
}
|