Code

Cleaned up code.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Nov 2006 12:24:14 +0000 (12:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Nov 2006 12:24:14 +0000 (12:24 +0000)
Removed old acl functions.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5034 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupApplication.inc
plugins/admin/groups/class_groupManagement.inc
plugins/admin/groups/main.inc

index e29898ce92b105956b2f7a1f013b4406f403f3b7..eff39655d6e7d8c3226961119088a7de7606c672 100644 (file)
@@ -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)){
index 0415f1d86babeb63d21c687231b3b97e5141bd24..f167c143241118c8c3ed2dfde70e5fdf50812f94 100644 (file)
@@ -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);
     }
index 5a86bbee3f8ea8b32aac4d0db6b82eb6f494f64c..3a12101639059f7144440501bc859d5cc743d6c0 100644 (file)
@@ -52,7 +52,6 @@ if ($remove_lock){
     sess_del ('groupManagement');
   }
 
-
   /* Show and save dialog */
   $_SESSION['groupManagement']= $groupManagement;
 }