Code

Fixed problem with trustMode copy&paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 12:49:19 +0000 (12:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 12:49:19 +0000 (12:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17883 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/posix/class_posixAccount.inc
gosa-core/plugins/personal/posix/trustModeDialog/class_trustModeDialog.inc

index fa9635a348a13b8e6ca700ab0c731378865aba80..30d53500f74f17047a7d0a9a88cfada614659c2b 100644 (file)
@@ -759,8 +759,6 @@ class posixAccount extends plugin
     }
     /* Call parents save to prepare $this->attrs */
     plugin::save();
-    $this->trustModeDialog->dn = $this->dn;
-    $this->trustModeDialog->save();
 
     /* include global link_info */
     $this->cleanup();
@@ -801,6 +799,9 @@ class posixAccount extends plugin
       $this->ssh->save();
     }
 
+    $this->trustModeDialog->dn = $this->dn;
+    $this->trustModeDialog->save();
+
     /* Take care about groupMembership values: add to groups */
     foreach ($this->groupMembership as $key => $value){
       if (!isset($this->savedGroupMembership[$key])){
@@ -1256,6 +1257,12 @@ class posixAccount extends plugin
       $this->primaryGroup= $source['gidNumber'][0];
     }
 
+    $tmp = new trustModeDialog($this->config, $source['dn']);
+    $this->trustModeDialog = new trustModeDialog($this->config, $this->dn);
+    $this->trustModeDialog->trustModel = $tmp->trustModel;
+    $this->trustModeDialog->accessTo = $tmp->accessTo;
+    $this->trustModeDialog->setAcl('users/posixAccount');
+
   }
 
 
index fcd475f0eed14b950fd9a790c3c868b107d6fa4f..ad7b79c43841cb9e7c62fb98f8475548b932d7a0 100644 (file)
@@ -211,8 +211,14 @@ class trustModeDialog extends plugin
 
     public function save()
     {
+       
+        $ldap = $this->config->get_ldap_link();
+        $ldap->cd($this->config->current['BASE']);
+        $ldap->cat($this->dn);
+        $this->attrs = $ldap->fetch();
+
         plugin::save();
-        
         /* Trust accounts */
         $objectclasses= array();
         foreach ($this->attrs['objectClass'] as $key => $class){