Code

Added remove_from_parent functionality to acls.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Apr 2007 08:23:50 +0000 (08:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Apr 2007 08:23:50 +0000 (08:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6183 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_acl.inc
plugins/admin/acl/class_aclManagement.inc

index 4e94b40c44e124e0d50289c436f86f36ea955cb4..70facd61d1b2f0a02a0df5445c941946f908189e 100644 (file)
@@ -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));
   }
 
 }
index 7eb673fa27a91fb24ea274731dd9478ddbaee509..a0923c47c7c50bb63d1043cd1166260aee8beee3 100644 (file)
@@ -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;