From 663536a600b0db64c57cad9ec0622ab1bab6b4f2 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 7 Nov 2006 12:24:14 +0000 Subject: [PATCH] Cleaned up code. Removed old acl functions. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5034 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/groups/class_groupApplication.inc | 2 +- .../admin/groups/class_groupManagement.inc | 33 +++++++++---------- plugins/admin/groups/main.inc | 1 - 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index e29898ce9..eff39655d 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -1047,7 +1047,7 @@ class appgroup extends plugin } /* Get all apps ... */ - $res = get_list("objectClass=gosaApplication","application",$this->config->current['BASE'],array("gosaApplicationParameter","cn")); + $res = get_list("objectClass=gosaApplication","application",$this->config->current['BASE'],array("gosaApplicationParameter","cn"),GL_SUBSEARCH); $tmp = search_config($this->config->data,"faiManagement","CLASS"); $this->AllAppsForRelease = array(); if(!empty($tmp)){ diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 0415f1d86..f167c1432 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -26,21 +26,18 @@ class groupManagement extends plugin var $plDescription= "This does something"; /* Dialog attributes */ - var $grouptab= NULL; - var $grouplist= array(); - var $ui= NULL; - var $acl= ""; - - var $CopyPasteHandler = NULL; - var $DivListGroup = NULL; - - var $ShowPrimaryCheckBox = false; + var $grouptab = NULL; + var $grouplist = array(); + var $ui = NULL; + var $CopyPasteHandler = NULL; + var $DivListGroup = NULL; + var $ShowPrimaryCheckBox= false; function groupManagement ($config, $ui) { /* Save configuration for internal use */ - $this->config= $config; - $this->ui= $ui; + $this->config = $config; + $this->ui = $ui; /* Copy & Paste enabled ?*/ if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE']))){ @@ -63,6 +60,7 @@ class groupManagement extends plugin $this->DivListGroup->DisableCheckBox("ShowPrimaryGroups",$this->ShowPrimaryCheckBox); } + function execute() { /* Call parent execute */ @@ -226,7 +224,7 @@ class groupManagement extends plugin /* Load permissions for selected 'dn' and check if we're allowed to remove this 'dn' */ - $acl = $this->ui->get_permission($this->dn,"groups/group"); + $acl = $this->ui->get_permissions($this->dn,"groups/group"); if(preg_match("/d/",$acl)){ /* Check locking, save current plugin in 'back_plugin', so @@ -257,12 +255,12 @@ class groupManagement extends plugin /* Some nice guy may send this as POST, so we've to check for the permissions again. */ - $acl = $this->ui->get_permission($this->dn,"groups/group"); + $acl = $this->ui->get_permissions($this->dn,"groups/group"); if(preg_match("/d/",$acl)){ /* Delete request is permitted, perform LDAP action */ $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn); - $this->grouptab->set_acl(array($this->acl)); + $this->grouptab->set_acl_base($this->dn); $this->grouptab->delete (); gosa_log ("Group object'".$this->dn."' has been removed"); unset ($this->grouptab); @@ -509,9 +507,10 @@ class groupManagement extends plugin $acl = get_permissions ($dn, $this->ui->subtreeACL); $obj = new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $dn); + $obj->set_acl_base($dn); $objNew = new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], "new"); - $obj->set_acl($acl); - $objNew->set_acl($acl); + $obj->set_acl_base($dn); + $this->CopyPasteHandler->Copy($obj,$objNew); } @@ -524,7 +523,7 @@ class groupManagement extends plugin $acl= get_permissions ($dn, $this->ui->subtreeACL); $obj= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $dn); - $obj->set_acl($acl); + $obj->set_acl_base($dn); $this->CopyPasteHandler->Cut($obj); } diff --git a/plugins/admin/groups/main.inc b/plugins/admin/groups/main.inc index 5a86bbee3..3a1210163 100644 --- a/plugins/admin/groups/main.inc +++ b/plugins/admin/groups/main.inc @@ -52,7 +52,6 @@ if ($remove_lock){ sess_del ('groupManagement'); } - /* Show and save dialog */ $_SESSION['groupManagement']= $groupManagement; } -- 2.30.2