Hi,
I have built a custom plugin encapsulating one business workflow.
- In that plugin, I have a custom defined collection “tickets”.
- I’ve also registered a custom action handler “submit” (“tickets:submit”).
I now want to expose the “Submit” action to “Configure permissions” drawer in the “Users & Permissions” settings page, so that we can assign “Submit” for the “Tickets” collection to certain defined user roles on Individual Permission policies.
this.app.resourceManager.registerActionHandlers({
'tickets:submit': async (ctx: Context, next: Next) => {
// ...
}
});
this.app.acl.setAvailableAction('submit', {
displayName: 'Submit',
resource: 'tickets',
});
This is working well - I can assign the “Submit” action to individual roles, and when testing - it is correctly returning an HTTP 403 for roles that do not have that action permission checked, and succeeding HTTP 200 for roles that do have that permission.
The only problem I am experiencing, is that the “Submit” action shows as an option on the “General Action Permissions” tab - and for EVERY collection on the “Action Permissions” → “Individual Permissions Policy” area.
This action should only show as an option for the “tickets” resource/collection, not in the “General Action Permission” tab and not for every collection.
Is this possible? We are currently using Nocobase version 1.9.39