Code

Updated gotoLogView, to be able to set ACLs.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Sep 2008 12:11:01 +0000 (12:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Sep 2008 12:11:01 +0000 (12:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12524 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/class_gotoLogView.inc
gosa-plugins/goto/addons/goto/log_view.tpl

index 4193a586c6f686979cd5a03ac5babc4ebede683b..40c2db00839d7fed1a925b3b1d2146351e0490c3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class goto_log_view extends plugin
+class gotoLogView extends plugin
 {
   
   var $mac;
@@ -65,6 +65,7 @@ class goto_log_view extends plugin
       $this->selected_date = key($res[$this->mac]);
       $this->logs = $res;
     }
+
   }
 
 
@@ -161,6 +162,7 @@ class goto_log_view extends plugin
       $divlist->AddEntry($entry);
     }
 
+    $smarty->assign("ACL",preg_match("/r/",$this->getacl("")));
     $smarty->assign("divlist",$divlist->DrawList());
     return($smarty->fetch(get_template_path('log_view.tpl', TRUE,dirname(__FILE__))));
   }
@@ -191,6 +193,23 @@ class goto_log_view extends plugin
       $this->sort_by = $_GET['sort_by'];
     }
   }
+
+
+  /* Return plugin informations for acl handling */
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("Log view"),
+          "plDescription" => _("Goto log view"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 30,
+          "plSection"     => array("administration"),
+          "plCategory"    => array("workstation"),
+
+          "plProvidedAcls"=> array()
+            ));
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 5542cdf2ae5bb78667d14a8e4b48b05274dd5015..433214f221952f0f88a91cbf5129384bd87cbe7b 100644 (file)
@@ -1,16 +1,21 @@
-{if $logs_available}
+{if !$ACL}
 
-<h2>{t}Available logs{/t}</h2>
+       <h2>{msgPool type=permView}</h2>
 
-       <div style="width:99%;border: solid 1px #CCCCCC;">{$divlist}</div>
-  <br>
-  <p class="seperator"></p>
-       <h2>{t}Selected log{/t}: {$selected_log}</h2>
-       <div style="width:99%;height:350px;padding:3px;background-color:white; overflow-y: scroll;border: solid 1px;">
-               {$log_file}
-       </div>
 {else}
-       <h2>{t}No logs for this host available!{/t}</h2>
+       {if $logs_available}
+       <h2>{t}Available logs{/t}</h2>
+
+               <div style="width:99%;border: solid 1px #CCCCCC;">{$divlist}</div>
+         <br>
+         <p class="seperator"></p>
+               <h2>{t}Selected log{/t}: {$selected_log}</h2>
+               <div style="width:99%;height:350px;padding:3px;background-color:white; overflow-y: scroll;border: solid 1px;">
+                       {$log_file}
+               </div>
+       {else}
+               <h2>{t}No logs for this host available!{/t}</h2>
+       {/if}
 {/if}
 
 {if $standalone}