[dev] understanding Horde Permissions
Jan Schneider
jan at horde.org
Thu Dec 7 11:33:27 UTC 2017
Zitat von Sebastian Birnbach <birnbacs at gmail.com>:
> 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/
More information about the dev
mailing list