summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 487b511)
raw | patch | inline | side by side (parent: 487b511)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Oct 2008 13:29:10 +0000 (13:29 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Oct 2008 13:29:10 +0000 (13:29 +0000) |
-Added Acls.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12691 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12691 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc | patch | blob | history | |
gosa-plugins/opsi/admin/opsi/properties.tpl | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc b/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc
index 91c4d8a153e5129cae9bd6b31982613e359a29a8..07304d11ed643a103e7a559a5f8a3fed7510abf1 100644 (file)
*/
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__))));
*/
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));
+ }
}
}
}
{
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 be54a4a01c593b22b6edb8911d37413131bd3105..9f4c62325428fb6494b6e32e0390dbb6e0811d47 100644 (file)
<tr>
<td>{$key}</td>
<td>
+{render acl=$ACL}
{if $item.VALUE_CNT}
<select name="value_{$key}" style='width:180px;'>
{foreach from=$item.VALUE key=k item=i}
{else}
<input type='input' name='value_{$key}' value="{$item.DEFAULT}" style='width:280px;'>
{/if}
-
+{/render}
</td>
</tr>
{/foreach}