From d9fd65a5f8dd8086de2a7364fc6f1fa9522f2526 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 19 Sep 2008 12:28:01 +0000 Subject: [PATCH] Updated terminal Informations -Added ACL checks. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12527 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/goto/class_terminalInfo.inc | 20 ++++++++++++++++++- gosa-plugins/goto/admin/systems/goto/info.tpl | 6 ++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc index 071c99bf6..d92a958eb 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc @@ -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: diff --git a/gosa-plugins/goto/admin/systems/goto/info.tpl b/gosa-plugins/goto/admin/systems/goto/info.tpl index 02260dbb8..f086d2e04 100644 --- a/gosa-plugins/goto/admin/systems/goto/info.tpl +++ b/gosa-plugins/goto/admin/systems/goto/info.tpl @@ -1,3 +1,8 @@ + +{if !$ACL} +

{msgPool type=permVietype=permVieww}

+{else} +

{t}System information{/t}

@@ -132,3 +137,4 @@
{/if} +{/if} -- 2.30.2