Code

Updated ACL checks.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 12:09:36 +0000 (12:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 12:09:36 +0000 (12:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11031 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_divListDepartment.inc

index 74512bc7bb94ba8d07ee0601ff2378145c80b8fa..f4f85944fcbf24fc778b29330194827ca502aea2 100644 (file)
@@ -147,15 +147,15 @@ class divListDepartment extends MultiSelectWindow
 
     /* Create Layers menu */
     $s  = ".|"._("Actions")."|\n";
-    $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
-      "&nbsp;"._("Create")."|\n";
 
     /* Append create options */
     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='plugins/departments/images/department.png' alt=''>".
         "&nbsp;"._("Department")."|dep_new|\n";
+      $s.= "..|---|\n";
     }
-    $s.= "..|---|\n";
     $s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
       "&nbsp;"._("Remove")."|"."remove_multiple|\n";
 
@@ -180,12 +180,12 @@ class divListDepartment extends MultiSelectWindow
       $actions= "";      
 
       $acl = $ui->get_permissions($this->config->departments[$key] ,"department/department");
-      if(preg_match("/r/",$acl)){
-        $actions.= "<input class='center' type='image' src='images/lists/edit.png'
-          alt='"._("edit")."'   name='dep_edit_%KEY%' title='"._("Edit this entry")."'>";
-      }
+      $acl_all = $ui->has_complete_category_acls($this->config->departments[$key] ,"department");
+
+      $actions.= "<input class='center' type='image' src='images/lists/edit.png'
+        alt='"._("edit")."'   name='dep_edit_%KEY%' title='"._("Edit this entry")."'>";
 
-      if(preg_match("/c/",$acl)){
+      if(preg_match("/d/",$acl)){
         $actions.= "<input class='center' type='image' src='images/lists/trash.png'
           alt='"._("delete")."'   name='dep_del_%KEY%' title='"._("Delete this entry")."'>";
       }