chore: append acl strategy resource

This commit is contained in:
Chareice 2025-01-24 23:29:26 +08:00
parent a00dcb78cb
commit c71de7a307
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,8 @@ export class PluginFieldChinaRegionServer extends Plugin {
this.app.acl.allow('chinaRegions', 'list', 'loggedIn');
this.app.acl.appendStrategyResource('chinaRegions');
this.app.resourceManager.use(async function blockChinaRegionList(ctx, next) {
const { resourceName, actionName } = ctx.action.params;

View File

@ -256,6 +256,8 @@ export class PluginFileManagerServer extends Plugin {
this.app.acl.allow('attachments', ['upload', 'create'], 'loggedIn');
this.app.acl.allow('storages', 'getRules', 'loggedIn');
this.app.acl.appendStrategyResource('attachments');
// this.app.resourcer.use(uploadMiddleware);
// this.app.resourcer.use(createAction);
// this.app.resourcer.registerActionHandler('upload', uploadAction);