nghi Posted April 22, 2016 Posted April 22, 2016 When I'm log-in as a super user my module appears under setup. But when I'm as another role (normal user) it doesn't appear.I'm quite confuse on how to setup the permission. Is there a module I can that I can look at as an example?
LostKobrakai Posted April 22, 2016 Posted April 22, 2016 A module is by default only visible to superusers. If you've specified a permission in the module's info data you can give this permission to users to grant them access to the module.
nghi Posted April 22, 2016 Author Posted April 22, 2016 I figured out my problem. I had to uninstall and install my module again and my admin page seem to have been setup improperly in the __install(). Very weird, all I did was move a few lines. Not sure if the ordering matter but the below code work for me. When creating an admin page. $p = new Page(); $p->template = $this->templates->get("admin"); $p->name = self::PAGE_NAME; $p->parent = $this->pages->get($this->config->adminRootPageID)->child('name=setup'); $p->process = $this; $p->title = 'Variable Settings'; $p->save();
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