mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 19:31:53 +02:00
Fixes proposed by ralfbecker on the ACL.
This commit is contained in:
parent
8a8a517631
commit
dde10d310a
@ -579,7 +579,11 @@
|
|||||||
$db2->query($sql . $security ,__LINE__,__FILE__);
|
$db2->query($sql . $security ,__LINE__,__FILE__);
|
||||||
$rights = 0;
|
$rights = 0;
|
||||||
$accounts = Array();
|
$accounts = Array();
|
||||||
if ($db2->num_rows() == 0){ return False; }
|
if ($db2->num_rows() == 0)
|
||||||
|
{
|
||||||
|
$grants[$phpgw_info['user']['account_id']] = (~ 0);
|
||||||
|
return $grants;
|
||||||
|
}
|
||||||
while ($db2->next_record())
|
while ($db2->next_record())
|
||||||
{
|
{
|
||||||
$grantor = $db2->f('acl_account');
|
$grantor = $db2->f('acl_account');
|
||||||
@ -619,7 +623,9 @@
|
|||||||
}
|
}
|
||||||
$grants[$grantors] |= $rights;
|
$grants[$grantors] |= $rights;
|
||||||
}
|
}
|
||||||
|
reset($accounts[$grantor]);
|
||||||
}
|
}
|
||||||
|
$grants[$phpgw_info['user']['account_id']] = (~ 0);
|
||||||
return $grants;
|
return $grants;
|
||||||
}
|
}
|
||||||
} //end of acl class
|
} //end of acl class
|
||||||
|
@ -43,15 +43,13 @@
|
|||||||
global $phpgw_info, $p;
|
global $phpgw_info, $p;
|
||||||
|
|
||||||
$p->set_var($acl,$label.$phpgw_info['flags']['currentapp'].'['.$id.']['.$right.']');
|
$p->set_var($acl,$label.$phpgw_info['flags']['currentapp'].'['.$id.']['.$right.']');
|
||||||
|
$rights_set = (($rights & $right)?' checked':'');
|
||||||
if ($is_group)
|
if ($is_group)
|
||||||
{
|
{
|
||||||
// This is so you can't select it in the GUI
|
// This is so you can't select it in the GUI
|
||||||
$p->set_var($acl.'_selected',' disabled');
|
$rights_set .= ' disabled';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$p->set_var($acl.'_selected',(($rights & $right)?' checked':''));
|
|
||||||
}
|
}
|
||||||
|
$p->set_var($acl.'_selected',$rights_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_row($bg_color,$label,$id,$name,$is_group)
|
function display_row($bg_color,$label,$id,$name,$is_group)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user