diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index c53d49542c..0ca74f0fc3 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -313,10 +313,10 @@ class acl * * @param string $location app location * @param string $appname='' optional defaults to currentapp - * @param int $account_id=0 optional defaults to $this->account_id + * @param array $memberships=array() additional account_id, eg. memberships to match beside $this->account_id, default none * @return int $rights */ - function get_specific_rights($location, $appname = '') + function get_specific_rights($location, $appname = '', $memberships=array()) { if (!$appname) $appname = $GLOBALS['egw_info']['flags']['currentapp']; @@ -330,7 +330,7 @@ class acl { if ($value['appname'] == $appname && ($value['location'] == $location || $value['location'] == 'everywhere') && - $value['account'] == $this->account_id) + ($value['account'] == $this->account_id || $memberships && in_array($value['account'], $memberships))) { if ($value['rights'] == 0) { diff --git a/preferences/inc/class.uiaclprefs.inc.php b/preferences/inc/class.uiaclprefs.inc.php index 7102b3dbdb..5b6b71a9a3 100644 --- a/preferences/inc/class.uiaclprefs.inc.php +++ b/preferences/inc/class.uiaclprefs.inc.php @@ -345,7 +345,7 @@ class uiaclprefs //echo "
display_row(,$label,$id,$name,$no_privat_grants,".print_r($memberships,true).")
\n"; $this->template->set_var('row_class',$tr_class); $this->template->set_var('user',$name); - $rights = $this->acl->get_rights($id,$GLOBALS['egw_info']['flags']['currentapp']); + $rights = $this->acl->get_specific_rights($id, $GLOBALS['egw_info']['flags']['currentapp'], $memberships); foreach(array( EGW_ACL_READ => 'read',