From: hickert Date: Tue, 14 Oct 2008 13:29:10 +0000 (+0000) Subject: Updated opsiProperties X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dbeea1e6b44c01f2db466f3524ef6acb3d66967e;p=gosa.git Updated opsiProperties -Added Acls. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12691 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc b/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc index 91c4d8a15..07304d11e 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc @@ -31,7 +31,11 @@ class opsiProperties extends plugin */ public function execute() { + $ui =get_userinfo(); + $acl = $ui->get_permissions($this->config->current['BASE'],"opsi/opsiProperties",""); + $smarty = get_smarty(); + $smarty->assign("ACL",$acl); $smarty->assign("cfg",$this->cfg); $smarty->assign("cfg_count",count($this->cfg)); return($smarty->fetch(get_template_path("properties.tpl",TRUE,dirname(__FILE__)))); @@ -42,9 +46,12 @@ class opsiProperties extends plugin */ public function save_object() { - foreach($this->cfg as $name => $value){ - if(isset($_POST['value_'.$name])){ - $this->cfg[$name]['DEFAULT'] = validate(get_post('value_'.$name)); + $acl = $ui->get_permissions($this->config->current['BASE'],"opsi/opsiProperties",""); + if(preg_match("/w/",$acl)){ + foreach($this->cfg as $name => $value){ + if(isset($_POST['value_'.$name])){ + $this->cfg[$name]['DEFAULT'] = validate(get_post('value_'.$name)); + } } } } @@ -91,6 +98,23 @@ class opsiProperties extends plugin { return($this->hostId); } + + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array( + "plShortName" => _("Products"), + "plDescription" => _("Product properties"), + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 10, + "plSection" => array("administration"), + "plCategory" => array("opsi"), + "plProvidedAcls"=> array( + ) + )); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/gosa-plugins/opsi/admin/opsi/properties.tpl b/gosa-plugins/opsi/admin/opsi/properties.tpl index be54a4a01..9f4c62325 100644 --- a/gosa-plugins/opsi/admin/opsi/properties.tpl +++ b/gosa-plugins/opsi/admin/opsi/properties.tpl @@ -14,6 +14,7 @@ {$key} +{render acl=$ACL} {if $item.VALUE_CNT} {/if} - +{/render} {/foreach}