From cbb7d8db118a152b04c4adcb83a4d2d4f383392a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Tue, 5 Jul 2016 12:34:07 +0200 Subject: [PATCH] Fixes #4970 fixed the way acl_base is set at plugin creation --- include/class_objects.inc | 6 +----- include/simpleplugin/class_attribute.inc | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/class_objects.inc b/include/class_objects.inc index 97a3a6da5..f73b179d7 100644 --- a/include/class_objects.inc +++ b/include/class_objects.inc @@ -152,11 +152,7 @@ class objects $tabClass = $infos['tabClass']; $tabObject = new $tabClass($type, $dn); - if ($dn == 'new') { - $tabObject->set_acl_base($config->current['BASE']); - } else { - $tabObject->set_acl_base($dn); - } + $tabObject->set_acl_base(); @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $dn, "Openned as $type object"); return $tabObject; diff --git a/include/simpleplugin/class_attribute.inc b/include/simpleplugin/class_attribute.inc index 4e16c3da2..a0d090ab0 100644 --- a/include/simpleplugin/class_attribute.inc +++ b/include/simpleplugin/class_attribute.inc @@ -1959,6 +1959,7 @@ class BaseSelectorAttribute extends Attribute /* Set the new acl base */ if ($this->plugin->dn == 'new') { $this->plugin->set_acl_base($this->value); + $this->plugin->parent->set_acl_base(); } if (($this->baseSelector !== NULL) && ($this->baseSelector->getBase() !== $this->value)) { -- GitLab