Code

Fixed saving of posix account.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 07:07:07 +0000 (07:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 07:07:07 +0000 (07:07 +0000)
Group membership wasn't initiated with category type.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4591 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc
plugins/personal/generic/class_user.inc
plugins/personal/posix/class_posixAccount.inc

index ee40925c0800f33cfe8d4e378984cc9ffd2470b4..dc4480d6d676b59ed3da797a474a81bb77905b7e 100644 (file)
@@ -817,12 +817,12 @@ class printgeneric extends plugin
         $id = $key;
       }
     }
-    
-    if(!$this->acl_is_writeable($type)){
+  
+    if(!$this->acl_is_writeable("gotoUserPrinter")){
       print_red(sprintf(_("You are not allowed to remove the given object '%s' from the list of members of printer '%s'."),$id,$this->dn));
       return(FALSE);
     }
-  
     if(isset($this->member[$type][$id])){
       unset($this->member[$type][$id]);
       return(TRUE);
index b4b7092488f290cef28b17e03d9741d1d03c4591..17c92f0a410d80afcc8916baf23ad8571824dbd1 100644 (file)
@@ -825,7 +825,7 @@ class user extends plugin
       }
 
     } elseif(!$this->is_new) {
-      echo "I think this is not currect, but can't test it right now. ";
+      // # FIXME User picture saveing ...  seams to work.
       // This should be set to array in all cases ... else we write *removed* into this attribute ...
       $this->attrs["jpegPhoto"] = array();
     }
index ea92f8544695b33b0ed6881fa5d0929d215af1a2..5defa47bb68227d9170a41ae65cf6ea6acfdd792 100644 (file)
@@ -875,7 +875,8 @@ class posixAccount extends plugin
 
     /* Take care about groupMembership values: add to groups */
     foreach ($this->groupMembership as $key => $value){
-      $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key);
+      $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key,"groups");
+      $g->set_acl_base($key);
       $g->by_object['group']->addUser($this->uid);
       $g->save();
     }
@@ -883,7 +884,8 @@ class posixAccount extends plugin
     /* Remove from groups not listed in groupMembership */
     foreach ($this->savedGroupMembership as $key => $value){
       if (!isset($this->groupMembership[$key])){
-        $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key);
+        $g= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $key,"groups");
+        $g->set_acl_base($key);
         $g->by_object['group']->removeUser ($this->uid);
         $g->save();
       }