Jump to content

Recommended Posts

Posted

How can I give a user access to a custom process admin page I created in /admin/ ? Without giving them superuser?

Posted

In your Process module, make the getModuleInfo() function return the required permission to access the module. For example, here's the one used by the ProcessPageEdit module:

<?php
public static function getModuleInfo() {
    return array(
        'title' => 'Page Edit',
        'summary' => 'Edit a Page',
        'version' => 100,
        'permanent' => true,
        'permission' => 'page-edit',    // note this line
    );
}

So for the PageEdit module, we've assigned the permission 'page-edit' as the one required to access the module. In your own module, you can specify any existing permission, or make one up. If you make one up, then you'll want to go and add it to your permissions. From there, you can assign that permission to any roles. Any users having that role will be able to access the module.

Posted

Thanks Ryan, I somehow missed that by not looking close enough :D

That's great to know and now works as expected.

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
  • Recently Browsing   0 members

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