only allow one entityType per permission

This commit is contained in:
Mads Rasmussen
2023-09-26 11:38:46 +02:00
parent 2862d69f9e
commit 674bf18f5c
3 changed files with 13 additions and 13 deletions

View File

@@ -6,5 +6,5 @@ export interface ManifestUserGranularPermission extends ManifestElement {
}
export interface MetaUserGranularPermission {
entityType: Array<string>;
entityType: string;
}

View File

@@ -7,7 +7,7 @@ export interface ManifestUserPermission extends ManifestBase {
export interface MetaUserPermission {
label: string;
entityType: Array<string>;
entityType: string;
description?: string;
group?: string;
}

View File

@@ -20,7 +20,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_READ,
name: 'Read Document User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Read',
description: 'Allow access to browse documents',
},
@@ -30,7 +30,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT,
name: 'Create Document Blueprint User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Create Content Template',
description: 'Allow access to create a Content Template',
},
@@ -40,7 +40,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_DELETE,
name: 'Delete Document User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Delete',
description: 'Allow access to delete a document',
},
@@ -50,7 +50,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_CREATE,
name: 'Create Document User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Create',
description: 'Allow access to create a document',
},
@@ -60,7 +60,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS,
name: 'Document Notifications User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Notifications',
description: 'Allow access to setup notifications for documents',
},
@@ -70,7 +70,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_PUBLISH,
name: 'Publish Document User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Publish',
description: 'Allow access to publish a document',
},
@@ -80,7 +80,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS,
name: 'Document Permissions User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Permissions',
description: 'Allow access to change permissions for a document',
},
@@ -90,7 +90,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_SEND_FOR_APPROVAL,
name: 'Send Document For Approval User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Send For Approval',
description: 'Allow access to send a document for approval before publishing',
},
@@ -100,7 +100,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH,
name: 'Unpublish Document User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Unpublish',
description: 'Allow access to unpublish a document',
},
@@ -110,7 +110,7 @@ const permissions: Array<ManifestUserPermission> = [
alias: UMB_USER_PERMISSION_DOCUMENT_UPDATE,
name: 'Update Document User Permission',
meta: {
entityType: ['document'],
entityType: 'document',
label: 'Update',
description: 'Allow access to save a document',
},
@@ -125,7 +125,7 @@ export const granularPermissions: Array<ManifestUserGranularPermission> = [
loader: () =>
import('../components/input-document-granular-permission/input-document-granular-permission.element.js'),
meta: {
entityType: ['document'],
entityType: 'document',
},
},
];