Code

Updated acl management list,
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Nov 2008 10:24:05 +0000 (10:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Nov 2008 10:24:05 +0000 (10:24 +0000)
-Hide create action if we do not have the correct permissions.

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

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

index a97cc103955367a266ca9858209d4d77875ed4f4..b13477182bf1917b28e9c06b39891417fb1f84e5 100644 (file)
@@ -94,16 +94,22 @@ class divListApplication extends MultiSelectWindow
 
     /* Get acls */
     $ui       = get_userinfo();
-    $acl      = $ui->get_permissions($this->selectedBase,"application/application");
-    $acl_all  = $ui->has_complete_category_acls($this->parent->app_base,"application");
+
+    if($this->parent->IsReleaseManagementActivated()){
+      $acl      = $ui->get_permissions($this->parent->acl_base,"application/application");
+      $acl_all  = $ui->has_complete_category_acls($this->parent->acl_base,"application");
+    }else{
+      $acl      = $ui->get_permissions($this->selectedBase,"application/application");
+      $acl_all  = $ui->has_complete_category_acls($this->parent->app_base,"application");
+    }
 
     /* Create Layers menu */
     $s  = ".|"._("Actions")."|\n";
 
     /* Append create options */
+    $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
+      "&nbsp;"._("Create")."|\n";
     if(preg_match("/c/",$acl)) {
-      $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
-        "&nbsp;"._("Create")."|\n";
       $s.= "...|<input class='center' type='image' src='images/list_new_app' alt=''>".
         "&nbsp;"._("Application")."|appl_new|\n";
     }