From 8b1d3f341f012c2dc8d7817d7441a57295f52b8d Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Apr 2007 08:23:50 +0000 Subject: [PATCH] Added remove_from_parent functionality to acls. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6183 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_acl.inc | 11 +++++++++++ plugins/admin/acl/class_aclManagement.inc | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/class_acl.inc b/include/class_acl.inc index 4e94b40c4..70facd61d 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -1043,6 +1043,17 @@ class acl extends plugin function remove_from_parent() { + plugin::remove_from_parent(); + + /* include global link_info */ + $ldap= $this->config->get_ldap_link(); + + $ldap->cd($this->dn); + $this->cleanup(); + $ldap->modify ($this->attrs); + + /* Optionally execute a command after we're done */ + $this->handle_post_events("remove",array("uid" => $this->uid)); } } diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index 7eb673fa2..a0923c47c 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -56,7 +56,7 @@ class aclManagement extends plugin /* Call parent execute */ plugin::execute(); - $_SESSION['LOCK_VARS_TO_USE'] = array("/^list/","/^id_/","/^list_acl_role_del/"); + $_SESSION['LOCK_VARS_TO_USE'] = array("/^list/","/^id_/","/^list_acl_role_del/","/^list_acl_del/"); $smarty = get_smarty(); // Smarty instance $s_action = ""; // Contains the action to be taken @@ -302,14 +302,14 @@ class aclManagement extends plugin ********************/ /* Confirmation for deletion has been passed. Acl should be deleted. */ - if (isset($_POST['delete_acl_confirmed'])){ + if (isset($_POST['delete_acl_confirm'])){ /* Check permissions */ if(preg_match("/d/",$this->ui->get_permissions($this->dn,"acl/acl"))){ /* Delete request is permitted, perform LDAP action */ $this->acltabs= new acl($this->config, NULL,$this->dn); - $this->acltabs->delete (); + $this->acltabs->remove_from_parent(); gosa_log ("ACL object '".$this->dn."' has been removed"); unset ($this->acltabs); $this->acltabs= NULL; -- 2.30.2