Re: Permissions on sourceroots
Christian Stadler <[email protected]> Sat, 19 Mar 2005 01:37:45 +0100
| Newsgroups | gmane.comp.horde.chora |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christian Stadler schrieb: > [email protected] 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----- -- Chora mailing list - Join the hunt: http://horde.org/bounties/#chora Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]