[chora] Re: Permissions on sourceroots
Christian Stadler
webmaster at ragnarokonline.de
Fri Mar 18 16:37:45 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Stadler schrieb:
> offermann at thielpark.de schrieb:
>>>For group-permission:
>>>
>>>require_once 'Horde/Group.php';
>>>$groups = &Group::singleton();
>>>if ($groups === false) { return; }
>>>if ($groups->userIsInGroup(Auth::getAuth(),'groupname')) {
>>>...
>>>}
> Thanks for your help. Thats, what I was looking for.
Ok, it wasn't exactly, what I was looking for. I'm now adding
subpermissions, which have the same name as each repository-key.
I'm solving this by adding the following code at the very end of
sourceroots.php:
foreach (array_keys($sourceroots) AS $key)
{
if (!$registry->hasPermission('chora:' . $key))
{
unset ($sourceroots[$key]);
}
}
Although its a quick and dirty solution, it does mostly that, what I
want it to do :-)
Regards,
Christian Stadler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCO3RZ9250Hcbf/3IRAuklAJ9ga7JTLz9aRK9ndkh95jSa2ZfGXQCeKkt4
TMYJo2+wGG/o8NbsM8KkSe8=
=v2B3
-----END PGP SIGNATURE-----
More information about the chora
mailing list