Code

Updated ACL handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Nov 2008 10:26:14 +0000 (10:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Nov 2008 10:26:14 +0000 (10:26 +0000)
- Use   selected department   for acl checks in non fai mode and the ldap_base is fai is active.

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

gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/applications/class_divListApplication.inc

index d4727b11a5acf547cf9f221fd2f085a2786f4144..78ec8dede967db3de03095669ac666ad1e540fdb 100644 (file)
@@ -57,7 +57,6 @@ class applicationManagement extends plugin
     /* Save configuration for internal use */
     $this->config   = &$config;
     $this->ui       = &$ui;
-    $this->acl_base = $this->config->current['BASE'];
 
     /* Check if copy & paste is activated */
     if($this->config->boolValueIsTrue("MAIN","COPYPASTE")){
@@ -68,11 +67,15 @@ class applicationManagement extends plugin
     $this->DivListApplication = new divListApplication($this->config,$this);
 
     if($this->IsReleaseManagementActivated()){
-    /* Check if we should enable the release selection */
+      $this->acl_base = $this->config->current['BASE'];
+
+      /* Check if we should enable the release selection */
       $this->enableReleaseManagement = true;
 
       /* Hide SubSearch checkbox */
       $this->DivListApplication->DisableCheckBox("SubSearch");
+    }else{
+      $this->acl_base = &$this->DivListApplication->selectedBase;
     }
 
     /* Set default release */
@@ -233,14 +236,7 @@ class applicationManagement extends plugin
       /* Create new usertab object */
       $this->apptabs= new apptabs($this->config,$this->config->data['TABS']['APPSTABS'], $this->dn,"application");
       $this->apptabs->parent = &$this;
-
-      /* Check if there is a snapshot dialog open */
-      if($this->IsReleaseManagementActivated()){
-        $this->apptabs->set_acl_base($this->acl_base);
-      }else{
-        $this->apptabs->set_acl_base($this->DivListApplication->selectedBase);
-      }
-
+      $this->apptabs->set_acl_base($this->acl_base);
     }
 
 
index b13477182bf1917b28e9c06b39891417fb1f84e5..c281fa2c5752d3f2dd6d506b6aca9e4308d5d7dc 100644 (file)
@@ -93,7 +93,7 @@ class divListApplication extends MultiSelectWindow
     }
 
     /* Get acls */
-    $ui       = get_userinfo();
+    $ui = get_userinfo();
 
     if($this->parent->IsReleaseManagementActivated()){
       $acl      = $ui->get_permissions($this->parent->acl_base,"application/application");