mirror of
https://github.com/strapi/strapi.git
synced 2025-08-02 22:07:11 +00:00
53 lines
1.0 KiB
TypeScript
53 lines
1.0 KiB
TypeScript
![]() |
type Condition = {
|
||
|
id: string;
|
||
|
displayName: string;
|
||
|
category: string;
|
||
|
}
|
||
|
|
||
|
type Permission = {
|
||
|
action: string;
|
||
|
displayName: string;
|
||
|
plugin: string;
|
||
|
subCategory: string;
|
||
|
}
|
||
|
|
||
|
type ContentTypePermission = {
|
||
|
actionId: string;
|
||
|
applyToProperties: string[];
|
||
|
label: string;
|
||
|
subjects: string[];
|
||
|
}
|
||
|
|
||
|
type ContentTypeSubject = {
|
||
|
uid: string;
|
||
|
label: string;
|
||
|
properties: ContentTypeSubjectProperties[];
|
||
|
};
|
||
|
|
||
|
type ContentTypeSubjectPropertyChild = {
|
||
|
label: string;
|
||
|
value: string;
|
||
|
required?: boolean;
|
||
|
}
|
||
|
|
||
|
type ContentTypeSubjectProperties = {
|
||
|
label: string;
|
||
|
value: string;
|
||
|
children: ContentTypeSubjectPropertyChild[];
|
||
|
}
|
||
|
|
||
|
type ContentTypePermissions = {
|
||
|
actions: ContentTypePermission[];
|
||
|
subjects: ContentTypeSubject[];
|
||
|
}
|
||
|
|
||
|
export interface RolePermissions {
|
||
|
conditions: Condition[];
|
||
|
sections: {
|
||
|
plugins: Permission[];
|
||
|
settings: Permission[];
|
||
|
singleTypes: ContentTypePermissions;
|
||
|
collectionTypes: ContentTypePermissions;
|
||
|
}
|
||
|
}
|