Code

Merged changeset:13498
[gosa.git] / gosa-core / include / class_userinfo.inc
index 912bb29a093b6be9fbadda5f0ff34196a1c82e1a..992f3da004b79c77a9db20bd85d77452b4b13287 100644 (file)
@@ -158,8 +158,9 @@ class userinfo
 
           /* Inspect members... */
           foreach ($type['members'] as $grp => $grpdsc){
+
             /* Some group inside the members that is relevant for us? */
-            if (in_array_ics(preg_replace('/^G:/', '', $grp), $this->groups)){
+            if (in_array_ics(@LDAP::convert(preg_replace('/^G:/', '', $grp)), $this->groups)){
               $interresting= TRUE;
             }
 
@@ -196,8 +197,9 @@ class userinfo
     $without_self_acl = $all_acl = array();
     foreach($this->ACL as $dn => $acl){
       $sdn =$dn;
-      while(strpos($dn,",") !== FALSE){
-
+      $first= TRUE; // Run at least once 
+      while(strpos($dn,",") !== FALSE || $first){
+        $first = FALSE;
         if(isset($this->ACL[$dn])){
           $all_acl[$sdn][$dn] = $this->ACL[$dn];
           $without_self_acl[$sdn][$dn] = $this->ACL[$dn]; 
@@ -602,6 +604,11 @@ class userinfo
 
     foreach(str_split($newACL) as $char){
 
+      /* Skip "self" ACLs without combination of rwcdm, they have no effect.
+         -self flag without read/write/create/...
+       */
+      if(empty($char)) continue;
+
       /* Skip permanent and subtree entries */
       if (preg_match('/[sp]/', $acl[$char])){
         continue;