Skip to content

Commit 7c08a1d

Browse files
committed
feat: add permissions to notifications
1 parent 321ef6c commit 7c08a1d

File tree

1 file changed

+12
-1
lines changed
  • src/packages/documents/documents/entity-actions/notifications

1 file changed

+12
-1
lines changed

src/packages/documents/documents/entity-actions/notifications/manifests.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../entity.js';
2+
import { UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS } from '../../user-permissions/constants.js';
23
import { manifests as repositoryManifests } from './repository/manifests.js';
34
import { manifests as modalManifests } from './modal/manifests.js';
45
import type { ManifestEntityAction } from '@umbraco-cms/backoffice/extension-registry';
6+
import { UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS } from '@umbraco-cms/backoffice/recycle-bin';
57

68
const actionManifests: Array<ManifestEntityAction> = [
79
{
@@ -14,8 +16,17 @@ const actionManifests: Array<ManifestEntityAction> = [
1416
forEntityTypes: [UMB_DOCUMENT_ENTITY_TYPE],
1517
meta: {
1618
icon: 'icon-megaphone',
17-
label: '#notifications_notifications',
19+
label: '#actions_notify',
1820
},
21+
conditions: [
22+
{
23+
alias: 'Umb.Condition.UserPermission.Document',
24+
allOf: [UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS],
25+
},
26+
{
27+
alias: UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS,
28+
},
29+
],
1930
},
2031
];
2132

0 commit comments

Comments
 (0)