From 3e02142fda370245d206447049f49eef7dab0df7 Mon Sep 17 00:00:00 2001 From: Chareice Date: Sun, 3 Mar 2024 14:36:13 +0800 Subject: [PATCH] chore: acl snippets --- .../@nocobase/plugin-backup-restore/src/server/server.ts | 5 ++++- packages/plugins/@nocobase/plugin-users/src/server/server.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts index 815cfb5ae2..d04fbdf6ee 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/server.ts @@ -3,7 +3,10 @@ import backupFilesResourcer from './resourcers/backup-files'; export default class Duplicator extends Plugin { beforeLoad() { - // addRestoreCommand(this.app); + this.app.acl.registerSnippet({ + name: `pm.${this.name}`, + actions: ['backupFiles:*'], + }); } async load() { diff --git a/packages/plugins/@nocobase/plugin-users/src/server/server.ts b/packages/plugins/@nocobase/plugin-users/src/server/server.ts index de6344f458..359caef6e7 100644 --- a/packages/plugins/@nocobase/plugin-users/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-users/src/server/server.ts @@ -110,7 +110,7 @@ export default class PluginUsersServer extends Plugin { this.app.acl.registerSnippet({ name: `pm.${this.name}.*`, - actions: ['users:listExcludeRole'], + actions: ['users:listExcludeRole', 'users:list'], }); }