Re: understanding Horde Permissions
Jan Schneider <[email protected]> Thu, 07 Dec 2017 11:33:27 +0000
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <[email protected]> |
Zitat von Sebastian Birnbach <[email protected]>: > I see that and how permissions are defined in <application>/Application.php > through function perms(). It is also clear how to set permissions through > the console. > > However, I have a hard time accessing the permissions such as to enforce > them. > > I see that some Horde applications use <application>::hasPermission() and > overload the Horde_Registry_Application::hasPermissions() method (which > simply returns 1 all the time). But that does not give access to the > permissions set in the console. So, how do I read the console-controlled > permissions? > > https://wiki.horde.org/Doc/Dev/PermsPackage only shows information on Horde > <5. Most of this is actually for current Horde. You basically get a Perms object via $perms = $injector->getInstance('Horde_Perms'); and use that object via its API: https://webcache.googleusercontent.com/search?q=cache:1WbtzWapgYQJ:https://dev.horde.org/api/FRAMEWORK_4/lib/Perms/class-Horde_Perms_Base.html+&cd=1&hl=de&ct=clnk&gl=de&client=ubuntu The live API documentation is currently broken since the Git split, you have to use the cached version. -- Jan Schneider The Horde Project https://www.horde.org/ -- dev mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]