From 3188333c45e5fae0c5571269ef4d1729694469cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Sat, 22 Aug 2009 11:55:10 +0000 Subject: [PATCH] Implemented ability to check for more then one right for get_lists: @param int $required=EGW_ACL_READ required rights on the addressbook or multiple rights or'ed together, to return only listss fullfilling all the given rights --- addressbook/inc/class.addressbook_so.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_so.inc.php b/addressbook/inc/class.addressbook_so.inc.php index e31119b4a6..35195c3261 100755 --- a/addressbook/inc/class.addressbook_so.inc.php +++ b/addressbook/inc/class.addressbook_so.inc.php @@ -874,7 +874,8 @@ class addressbook_so /** * Get the availible distribution lists for a user * - * @param int $required=EGW_ACL_READ required rights on the list + * @param int $required=EGW_ACL_READ required rights on the list or multiple rights or'ed together, + * to return only lists fullfilling all the given rights * @param string $extra_labels=null first labels if given (already translated) * @return array with id => label pairs or false if backend does not support lists */ @@ -885,7 +886,7 @@ class addressbook_so $uids = array(); foreach($this->grants as $uid => $rights) { - if ($rights & $required) + if (($rights & $required) == $required) { $uids[] = $uid; }