summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4c0bff)
raw | patch | inline | side by side (parent: c4c0bff)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Apr 2010 15:44:42 +0000 (15:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Apr 2010 15:44:42 +0000 (15:44 +0000) |
-Fixed member detection
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17854 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17854 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/generic/references/class_aclResolver.inc | patch | blob | history |
diff --git a/gosa-core/plugins/generic/references/class_aclResolver.inc b/gosa-core/plugins/generic/references/class_aclResolver.inc
index 59dc2bf1d8dba48c60a45cfee1679310aca86d48..ab8fe53bae4992c911a2753f8b005d3bd463bd85 100644 (file)
// 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;
}
}
}
- // 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";
}
-
+ $str .= "<tr><td>".$class."</td></tr>";
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>");