Code

Updated gotoLogView
[gosa.git] / gosa-plugins / systems / admin / systems / class_divListSystemService.inc
index 8fc4e1cdac66a7c7f7eb0ebd5bbc293155ecb016..140e728e02ca9e501668727712f24ff5354571e4 100644 (file)
@@ -58,7 +58,7 @@ class divListSystemService extends MultiSelectWindow
        which are shown in the listbox on top of the listbox
      */
     $listhead = "<div style='background:#F0F0F9;height:16px;padding:0px;'>".
-    " <input type='image' align='middle' src='images/select_new_server.png' class='center' 
+    " <input type='image' align='middle' src='plugins/systems/images/select_new_server.png' class='center' 
         name='addNewService' alt='"._("Add service")."' title='"._("Add new service")."'>&nbsp;".
     " <img class='center' src='images/lists/seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
     " <input type='image' align='middle' src='images/status_start_all.png' class='center'
@@ -99,19 +99,18 @@ class divListSystemService extends MultiSelectWindow
         case SERVICE_STOPPED  : $str ="<img src='images/lists/off.png' title='"._("Stopped")."'>"; break;
         case SERVICE_STARTED  : $str ="<img src='images/lists/on.png' title='"._("Started")."'>"; break;
         case SERVICE_RESTARTED : $str ="<img src='images/status_restarting.png' title='"._("Restarting")."' alt='R'>"; break;
-        default: $str= "<img src='images/select_user.png' alt='".$entry['Status']."' title='"._("User status")." : ".$entry['Status']."'>";
+        default: $str= "<img src='plugins/users/images/select_user.png' alt='".$entry['Status']."' title='"._("User status")." : ".$entry['Status']."'>";
       }
 
-      /* Get acls */
-      $acl = $ui->get_permissions($this->parent->dn,"server/".$name);
-      if(preg_match("/w/i",$acl) && !preg_match("/r/i",$acl)){
-        continue;
-      }
-  
       $WasAccount = $this->parent->plugins[$name] -> initially_was_account;    
   
       $plug = $_GET['plug'];
-      $link = "<a href='?plug=".$plug."&amp;act=open&amp;id=".$name."'>".$entry['Message']."</a>";
+
+      if($entry['AllowEdit']){
+        $link = "<a href='?plug=".$plug."&amp;act=open&amp;id=".$name."'>".$entry['Message']."</a>";
+      }else{
+        $link = $entry['Message'];
+      }
 
       $field1 = array("string" => $str ,"attach" => "style='width:20px;'");
       $field2 = array("string" => $link);
@@ -123,13 +122,13 @@ class divListSystemService extends MultiSelectWindow
       }else{
         $actions .= "&nbsp;<img src='images/empty.png' width='16' alt=''>";
       }
-      if($entry['AllowStart'] && $WasAccount){
+      if($entry['AllowStop'] && $WasAccount){
         $actions .= "&nbsp;<input type='image' name='StopSingleService_".$name."' src='images/status_stop.png'
                             title='"._("Stop service")."'>";
       }else{
         $actions .= "&nbsp;<img src='images/empty.png' width='16' alt=''>";
       }
-      if($entry['AllowStart'] && $WasAccount){
+      if($entry['AllowRestart'] && $WasAccount){
         $actions .= "&nbsp;<input type='image' name='RestartSingleService_".$name."' src='images/lists/reload.png'
                             title='"._("Restart service")."'>";
       }else{
@@ -137,7 +136,7 @@ class divListSystemService extends MultiSelectWindow
       }
 
       /* Check if edit is enabled and allowed for current service */
-      if($entry['AllowEdit'] && preg_match("/(r|w)/i",$acl)){
+      if($entry['AllowEdit']){
         $actions .= "&nbsp;<input type='image' name='EditSingleService_".$name."' src='images/lists/edit.png'
                             title='"._("Edit service")."'>";
       }else{
@@ -145,7 +144,7 @@ class divListSystemService extends MultiSelectWindow
       }
 
       /* Check if remove is enabled and allowed for current service */
-      if($entry['AllowRemove'] && preg_match("/d/i",$acl)){
+      if($entry['AllowRemove']){
         $actions .= "&nbsp;<input type='image' name='RemoveSingleService_".$name."' src='images/lists/trash.png'
                             title='"._("Remove service")."'>";
       }else{