[dev] need a hint on sub-permissions in horde 4
Michael M Slusarz
slusarz at horde.org
Tue Nov 2 06:24:11 UTC 2010
Quoting Ralf Lang <lang at b1-systems.de>:
> Am Montag 01 November 2010, 15:03:53 schrieb Jan Schneider:
>> > Maybe I'm missing some obvious point.
>>
>> You need the 'tree' entry (containing any value) to notify Horde about
>> additional tree levels, just like in H3. Take a look at Whups' perms()
>> method.
>>
>> Jan.
>
> I looked at Whups_Application::perms() from git, but it doesn't make use of
> anything named tree. The permission groups only have the title key
> set and the
> actual "doing" permissions have the type = 'boolean' key, while the
> identifying hash key is $perms["$group:$item"]. I tried to clone this
> structure into Horde_Application::perms() but it still doesn't work.
>
> Maybe I need to implement some handling of the additional tree in the
> Horde_Application::hasPermission() function?
The perms() function in an app's App_Application class should return
the following array format:
array(
'perm_name' => array(
'title' => Perm title
'type' => Perm type
)
);
perm_name can contain sub-keys - these subkeys are separated by colons (':').
There is no 'tree' entry in the config anymore. The tree variable
used in the perms code is automatically generated from the perms()
response.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list