Managing admin permissions for custom local plugins

Well… found the way to do it, however it’s undocumented.
You should create a file /plugins/{plugin-name}/config/bootstrap.js. This action is executed by - as I understand it - by actionProvider.register. Here is an example of code, which works for me.

module.exports = async () => {

  // set plugin store

  registerPermissionActions();

};
  const registerPermissionActions = () => {
  const actions = [
    {
      section: 'plugins',
      displayName: '<display name of the plugin>',
      uid: 'read',
      pluginName: '<here goes the name of your plugin>',
    }
  ];

  const { actionProvider } = strapi.admin.services.permission;
  actionProvider.register(actions);
1 Like