Jump to content

Grant access to core-module-output for certain user-role


sz-ligatur
 Share

Recommended Posts

Hello,

I have a need, that the pagepath-history module should be accessible for a certain editor role (the output like under "settings"-tab › " What other URLs redirect to this page?" @page-edit). 
Is there a way to achieve this for core modules? E.g. add permissions for a module via hooks?

Link to comment
Share on other sites

The output of the path history on the settings-tab is only visible to superusers. However, you can access the path history of a page through the API. The module has no access restrictions. You may want to output the information somewhere else.

$modules->get('PagePathHistory')->getPathHistory($page);

Just in case, if you need to access a module with access restriction:

$modules->getModule('ModuleWithRequiredPermission', ['noPermissionCheck' => true]);

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...