From: <ral...@us...> - 2012-07-31 17:44:21
|
Author: ralfbecker Date: Tue Jul 31 19:44:01 2012 New Revision: 40008 URL: http://svn.stylite.de/viewvc/egroupware?rev=40008&view=rev Log: * Admin/Preferences: fixed not removable ACL rights for apps using NO group-acl, eg. Addressbook or InfoLog Modified: trunk/phpgwapi/inc/class.acl.inc.php trunk/preferences/inc/class.uiaclprefs.inc.php Modified: trunk/phpgwapi/inc/class.acl.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/phpgwapi/inc/class.acl.inc.php?rev=40008&r1=40007&r2=40008&view=diff ============================================================================== --- trunk/phpgwapi/inc/class.acl.inc.php (original) +++ trunk/phpgwapi/inc/class.acl.inc.php Tue Jul 31 19:44:01 2012 @@ -313,10 +313,10 @@ * * @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 @@ { 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) { Modified: trunk/preferences/inc/class.uiaclprefs.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/preferences/inc/class.uiaclprefs.inc.php?rev=40008&r1=40007&r2=40008&view=diff ============================================================================== --- trunk/preferences/inc/class.uiaclprefs.inc.php (original) +++ trunk/preferences/inc/class.uiaclprefs.inc.php Tue Jul 31 19:44:01 2012 @@ -345,7 +345,7 @@ //echo "<p>display_row(,$label,$id,$name,$no_privat_grants,".print_r($memberships,true).")</p>\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', |