Fixes proposed by ralfbecker on the ACL.

This commit is contained in:
skeeter 2001-06-30 14:55:46 +00:00
parent 8a8a517631
commit dde10d310a
2 changed files with 10 additions and 6 deletions

View File

@ -579,7 +579,11 @@
$db2->query($sql . $security ,__LINE__,__FILE__);
$rights = 0;
$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())
{
$grantor = $db2->f('acl_account');
@ -619,7 +623,9 @@
}
$grants[$grantors] |= $rights;
}
reset($accounts[$grantor]);
}
$grants[$phpgw_info['user']['account_id']] = (~ 0);
return $grants;
}
} //end of acl class

View File

@ -43,15 +43,13 @@
global $phpgw_info, $p;
$p->set_var($acl,$label.$phpgw_info['flags']['currentapp'].'['.$id.']['.$right.']');
$rights_set = (($rights & $right)?' checked':'');
if ($is_group)
{
// This is so you can't select it in the GUI
$p->set_var($acl.'_selected',' disabled');
}
else
{
$p->set_var($acl.'_selected',(($rights & $right)?' checked':''));
$rights_set .= ' disabled';
}
$p->set_var($acl.'_selected',$rights_set);
}
function display_row($bg_color,$label,$id,$name,$is_group)