Code

Fixed acl handling for group membership in posix dialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Apr 2007 09:07:34 +0000 (09:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Apr 2007 09:07:34 +0000 (09:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6185 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 340e6f301e4e46f98037a498287b7fb622cb27dc..6668f1cbbcd8c04801f0351674095f54b5ecdb5c 100644 (file)
@@ -1020,15 +1020,14 @@ class posixAccount extends plugin
   function delGroup ($groups)
   {
     $dest= array();
-
-    foreach ($this->groupMembership as $key => $value){
-      if ((!in_array($key, $groups)) || (obj_is_writable($attrs['dn'],"groups/group","memberUid"))){
-        $dest[$key]= $value;
+    foreach($groups as $dn_to_del){
+      if(isset($this->groupMembership[$dn_to_del]) && obj_is_writable($dn_to_del,"groups/group","memberUid")){
+        unset($this->groupMembership[$dn_to_del]);
       }
     }
-    $this->groupMembership= $dest;
   }
 
+
   /* Adapt from template, using 'dn' */
   function adapt_from_template($dn)
   {