From 9a0dd04fc44c7afa080b0a0dea3db4ce836d8f36 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 20 Sep 2006 04:16:31 +0000 Subject: [PATCH] Fixed acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4732 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servGeneric.inc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 34397aea6..beb041887 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -69,7 +69,7 @@ class servgeneric extends plugin } /* Check for action */ - if (isset($_POST['action'])){ + if (isset($_POST['action']) && $this->acvl_is_writeable("FAIstate")){ $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD"); if ($cmd == ""){ print_red(_("No ACTIONCMD definition found in your gosa.conf")); @@ -116,9 +116,9 @@ class servgeneric extends plugin /* Base select dialog */ $once = true; foreach($_POST as $name => $value){ - if(preg_match("/^chooseBase/",$name) && $once){ + if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){ $once = false; - $this->dialog = new baseSelectDialog($this->config,$this); + $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases()); $this->dialog->setCurrentBase($this->base); } } @@ -153,7 +153,7 @@ class servgeneric extends plugin } $smarty->assign("baseACL", $baseACL); - $smarty->assign("bases", $this->config->idepartments); + $smarty->assign("bases", $this->get_allowed_bases()); /* Assign attributes */ foreach ($this->attributes as $attr){ @@ -193,6 +193,11 @@ class servgeneric extends plugin function remove_from_parent() { + /* Cancel if there's nothing to do here */ + if ((!$this->initially_was_account) || (!$this->acl_is_removeable())){ + return; + } + $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); -- 2.30.2