Soma Posted October 19, 2011 Share Posted October 19, 2011 How can I give a user access to a custom process admin page I created in /admin/ ? Without giving them superuser? Link to comment Share on other sites More sharing options...
ryan Posted October 20, 2011 Share Posted October 20, 2011 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. Link to comment Share on other sites More sharing options...
Soma Posted October 20, 2011 Author Share Posted October 20, 2011 Thanks Ryan, I somehow missed that by not looking close enough That's great to know and now works as expected. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now