Code

Updated post handling
[gosa.git] / gosa-core / plugins / generic / references / class_aclResolver.inc
index 59dc2bf1d8dba48c60a45cfee1679310aca86d48..51d05a510ddd1482c628245949a72e090263725d 100644 (file)
@@ -33,7 +33,6 @@ class aclResolver
             $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){
@@ -146,7 +145,7 @@ class aclResolver
             // 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";
@@ -216,14 +215,14 @@ class aclResolver
                     // 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>";
@@ -232,7 +231,7 @@ class aclResolver
                         // Check if we're part of the group members 
                         if(preg_match("/^G/", $type)){
                             if($type == "G:*"){
-                                $gfound = TRUE;
+                                $found = TRUE;
                                 $groups[] = $name;
                                 continue;
                             }
@@ -242,19 +241,17 @@ class aclResolver
                                 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 ="";
@@ -270,10 +267,9 @@ class aclResolver
                    
                     // 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>");
@@ -296,7 +292,7 @@ class aclResolver
             $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>';