From f98623a83a29a99460bfcb63c491bf8f43bb035e Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 Apr 2010 12:49:19 +0000 Subject: [PATCH] Fixed problem with trustMode copy&paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17883 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/personal/posix/class_posixAccount.inc | 11 +++++++++-- .../posix/trustModeDialog/class_trustModeDialog.inc | 8 +++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc index fa9635a34..30d53500f 100644 --- a/gosa-core/plugins/personal/posix/class_posixAccount.inc +++ b/gosa-core/plugins/personal/posix/class_posixAccount.inc @@ -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'); + } diff --git a/gosa-core/plugins/personal/posix/trustModeDialog/class_trustModeDialog.inc b/gosa-core/plugins/personal/posix/trustModeDialog/class_trustModeDialog.inc index fcd475f0e..ad7b79c43 100644 --- a/gosa-core/plugins/personal/posix/trustModeDialog/class_trustModeDialog.inc +++ b/gosa-core/plugins/personal/posix/trustModeDialog/class_trustModeDialog.inc @@ -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){ -- 2.30.2