diff --git a/gosa-core/plugins/generic/references/class_aclResolver.inc b/gosa-core/plugins/generic/references/class_aclResolver.inc
index 43de674ebae4e10211330703cbbd35f116a4ad8a..51d05a510ddd1482c628245949a72e090263725d 100644 (file)
$tmp= session::global_get('plist');
$plist= $tmp->info;
$map = array();
- $map['all']= _("All categories");
foreach($plist as $class => $plInfo){
if(isset($plInfo['plCategory']) && is_array($plInfo['plCategory'])){
foreach($plInfo['plCategory'] as $category => $desc){
// Base template - each entry start with this
$tpl =
"\n <tr class='acl-viewer-head %s'>".
- "\n <td>%s</td>".
+ "\n <td style='width:20px'>%s</td>".
"\n <td colspan=2><b>%s</b><div class='right'>%s</div></td>".
"\n </tr>".
"\n %s";
// Check membership
$gmem = $umem = "";
$users = $groups = array();
- $gfound = $ufound = FALSE;
+ $found = FALSE;
foreach($acl['members'] as $type => $name){
// Check if we're part of the members
if(preg_match("/^U:/", $type)){
if(preg_match("/^U:".preg_quote($this->validateDn,'/')."/", $type)){
$users[] = $name;
- $ufound = TRUE;
+ $found = TRUE;
continue;
}
$users[] = "<span>".$name."</span>";
// Check if we're part of the group members
if(preg_match("/^G/", $type)){
if($type == "G:*"){
- $gfound = TRUE;
+ $found = TRUE;
$groups[] = $name;
continue;
}
if($ldap->count()){
$attrs = $ldap->fetch();
if(isset($attrs['memberUid']) && in_array($this->validateUid, $attrs['memberUid'])){
- $gfound = TRUE;
+ $found = TRUE;
$groups[] = $name;
+ continue;
}
}
- continue;
}
- // Group member doesn't mactch
+ // Mark groups that doesn't match
$groups[] = "<span>".$name."</span>";
}
}
- if(!count($groups)) $gfound = TRUE;
- if(!count($users)) $ufound = TRUE;
// Build up ACL definition list
$defs ="";
// Display the acl block in a special color if its not matching
$class="";
- if(!($gfound || $ufound) || !$match){
+ if(!$found || !$match){
$class = "acl-viewer-blocked";
}
-
if(!empty($filter)) $filter =sprintf($filter_tpl,$class,$filter);
if(!empty($defs)) $defs = sprintf($acl_tpl,$class,$defs);
if(count($users)) $umem = sprintf($umem_tpl,$class,"<li>".implode($users,'</li><li>')."</li>");
$str .= "<li><i>".$name.":</i> ";
$str .= "<ul class='acl-list'>";
if(preg_match("/s/", $acl)){
- $str.="<li><u>"._("Grant permission to owner").'</u></li>';
+ $str.="<li><u>"._("Restrict changes to user's own object").'</u></li>';
}
if(preg_match("/r/", $acl)) $str.="<li>"._("read").'</li>';
if(preg_match("/w/", $acl)) $str.="<li>"._("write").'</li>';