Only global administrator can access sidebar-select

Hello, i’m working on a plugin.
I have edited the sidebar (sidebar-select.phtml), i created a sidebarSelectAction function (extending the AbstractActionController) and i’ve set the route in the module.config.php →

Everything works fine as the global administrator, but i just noticed that if i am an editor- i get a error 500 when opening the sidebar:

How could i solve this?

The default ACL for controllers doesn’t grant permissions beyond administrators.

To grant permissions more widely, you need to define the ACL yourself. Modules typically add rules to the ACL in their onBootstrap method.

1 Like

thanks! now it works :slight_smile:

    public function onBootstrap(MvcEvent $event): void
        $acl = $this->getServiceLocator()->get('Omeka\Acl');
        $acl->allow(null, 'NestedDataType\Controller\Index');

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.