mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
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
This commit is contained in:
parent
ceaf32919f
commit
3188333c45
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user