diff --git a/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc b/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc
index 16d4b21279e09da1a6ea56365f8153477e39b7da..b7266c3322a1ccb2028e8964fbac3595d01484df 100644 (file)
private $product;
private $cfg;
private $hostId;
-
+ public $config;
/*! \brief Initializes the class.
@param Object The gosa configuration object
*/
public function execute()
{
+ plugin::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__))));
*/
public function save_object()
{
- foreach($this->cfg as $name => $value){
- if(isset($_POST['value_'.$name])){
- $this->cfg[$name] = validate(get_post('value_'.$name));
+ $ui =get_userinfo();
+ $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]['CURRENT'] = validate(get_post('value_'.$name));
+ }
}
}
}
{
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:
?>