Code

Updated terminal Informations
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Sep 2008 12:28:01 +0000 (12:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Sep 2008 12:28:01 +0000 (12:28 +0000)
-Added ACL checks.

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

gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc
gosa-plugins/goto/admin/systems/goto/info.tpl

index 071c99bf6494f4a0a41536fdf23818535ef4299d..d92a958eb2651ef802d3ab8ed2e3fa02fb4b1511 100644 (file)
@@ -70,7 +70,10 @@ class terminfo extends plugin
 
     $smarty= get_smarty();
     $display= "";
-    if(!is_callable("snmpget")){
+    $smarty->assign("ACL",TRUE);
+    if(!preg_match("/r/",$this->getacl(""))){
+      $smarty->assign("ACL",FALSE);
+    }elseif(!is_callable("snmpget")){
       msg_dialog::display(_("Configuration error"), msgPool::missingext("snmp"), ERROR_DIALOG);
 
       $smarty->assign("load", progressbar(0,100,15,true));
@@ -240,6 +243,21 @@ class terminfo extends plugin
   {
   }
 
+
+  /* Return plugin informations for acl handling */
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("System info"),
+          "plDescription" => _("System informations"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 33,
+          "plSection"     => array("administration"),
+          "plCategory"    => array("workstation","server","terminal"),
+          "plProvidedAcls"=> array()
+            ));
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 02260dbb82f609a3bd7e52eb7800f737129dd75b..f086d2e0417bdd197cf264d360a67d013bcfb45a 100644 (file)
@@ -1,3 +1,8 @@
+
+{if !$ACL}
+       <h2>{msgPool type=permVietype=permVieww}</h2>
+{else}
+
 <h2><img class="center" alt="" align="middle" src="images/info_small.png"> {t}System information{/t}</h2>
 <table summary="" style="width:100%;">
  <tr>
  </tr>
 </table>
 {/if}
+{/if}