Commit 2c3bdc42 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5564 Trying to fix base management on creation

parent 46585218
......@@ -254,13 +254,13 @@ class simplePlugin
}
}
/* Save initial account state */
$this->initially_was_account = $this->is_account;
$this->loadAttributes();
$this->prepareSavedAttributes();
/* Save initial account state */
$this->initially_was_account = $this->is_account;
$this->orig_dn = $dn;
if ($this->mainTab) {
......@@ -533,16 +533,10 @@ class simplePlugin
$deps = array();
/* Is this a new object ? Or just an edited existing object */
if (!$this->initially_was_account && $this->is_account) {
$new = TRUE;
} else {
$new = FALSE;
}
foreach ($config->idepartments as $dn => $name) {
if ($new && $this->acl_is_createable($dn)) {
if (!$this->initially_was_account && $this->acl_is_createable($dn)) {
$deps[$dn] = $name;
} elseif (!$new && $this->acl_is_moveable($dn)) {
} elseif ($this->initially_was_account && $this->acl_is_moveable($dn)) {
$deps[$dn] = $name;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment