Hi, I'm trying to find a way to create custom capabilities. I've gone through the NEWMODULE tutorials, but what I want is to create a system level capability. eg moodle/site:superadminpowers So that I can then check it with has_capability with the 4th parameter (doanything) set to false.
Basically what the end goal is, is to create a second uber-admin role that developer/admins can use to access certain pages that client/admins can't.
Thanks for you help,
Donnie
Hi there. Sorry I don't quite get you - why is merely making a second admin via site admin>users>permissions>assign system roles not acceptable? How do you want it to be different?
I want it to add special capabilities to one of them, we want the client's administrators to do almost everything in the site. But there's a few areas where they can, and have been known to, do things that can screw up the database.
Why not go to site admin>users>permissions>defiine roles and create a new role and then allow/prevent as you wish?
Because we're really looking to add capabilities on top of the default admin, the client administrators should be able to do everything they could in a basic moodle install, which is why we still need them to have site:doanything. The uber-admin will be able to access content in a few custom coded areas that aren't coded as modules, so the easiest way I can think of is to just add one extra capability to check against.
I've figured it out, thanks.
In reply to Donnie Hedin
This forum post has been removed
The content of this forum post has been removed and can no longer be accessed.
Really old post but , has anyone found an ideal way to do this? I was thinking of making a local plugin and defining capabilities there