Joined: Jun 14, 2006 Posts: 22 Location: New Mexico, USA
Posted:
Wed Nov 01, 2006 3:23 pm
Id like to be able to make certain sections of my module available only to admins. Id like to be able to have a seperate checkbox on the "edit admin" page for my module, this way i can give someone access without making them admin of my entire site. Ive seen this done with a few other modules before.
So what i need from you guys is how to make that check box, and what "if statement" i have to put it my module that checks if the logged in users is an admin.
Sorry i couldnt give you any more than this, I am very new to php.
I would suggest looking at existing modules (e.g. news) that allow admins to edit things directly from the module page. You could copy that logic in your custom module.
Generally for 7.5 and higher, if there's an modules/MODULENAME/admin script, there will be permissions automatically for that module script. Otherwise you would need to do as the old admin scripts did - create a permission in the authors table, authors.php script, and manually configure the scripts to use said permission
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum