* Admin/Preferences: fixed not removable ACL rights for apps using NO group-acl, eg. Addressbook or InfoLog

This commit is contained in:
Ralf Becker 2012-07-31 17:44:01 +00:00
parent 082372881d
commit 0195bad452
2 changed files with 4 additions and 4 deletions

View File

@ -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)
{

View File

@ -345,7 +345,7 @@ class uiaclprefs
//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',