From: hickert Date: Mon, 21 Jul 2008 08:48:13 +0000 (+0000) Subject: Updated gotoHotplug ACLs. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2e5ab425927b6aa55259c1d1caaa1c80cd1d3844;p=gosa.git Updated gotoHotplug ACLs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11722 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc index 07a497e1b..d66c4906c 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc @@ -15,8 +15,7 @@ class deviceGeneric extends plugin public $types; public $type; - public $posts = array("description","dev_id","serial","vendor", "type"); - public $attributes = array("cn"); + public $attributes = array("cn","description","dev_id","serial","vendor", "type"); public $objectclasses = array("top","gotoDevice"); public $CopyPasteVars = array("orig_cn","description","vendor","dev_id","serial","base"); @@ -71,13 +70,14 @@ class deviceGeneric extends plugin foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); } - foreach($this->posts as $attr){ - $smarty->assign($attr,$this->$attr); + + $tmp = $this->plInfo(); + foreach($tmp['plProvidedAcls'] as $attr => $desc){ + $smarty->assign($attr."ACL", $this->getacl($attr)); } $smarty->assign("type",$this->type); $smarty->assign ("types", $this->types); - return($smarty->fetch(get_template_path("deviceGeneric.tpl",TRUE,dirname(__FILE__)))); } @@ -136,12 +136,6 @@ class deviceGeneric extends plugin $this->base = get_post("base"); } } - - foreach($this->posts as $post){ - if(isset($_POST[$post])){ - $this->$post = get_post($post); - } - } } } @@ -171,8 +165,10 @@ class deviceGeneric extends plugin { plugin::save(); + $this->attrs = array(); + $this->attrs['cn'] = $this->cn; $this->attrs['gotoHotplugDevice'] = ""; - foreach($this->posts as $post){ + foreach(array("description","dev_id","serial","vendor", "type") as $post){ $this->attrs['gotoHotplugDevice'] .= $this->$post."|"; } $this->attrs['gotoHotplugDevice'] = preg_replace("/\|$/","",$this->attrs['gotoHotplugDevice']); @@ -245,7 +241,7 @@ class deviceGeneric extends plugin { return (array( "plShortName" => _("Generic"), - "plDescription" => _("Device generic"), + "plDescription" => _("Device generic")." ("._("Hotplug").")", "plSelfModify" => FALSE, "plDepends" => array(), "plPriority" => 0, @@ -253,7 +249,13 @@ class deviceGeneric extends plugin "plCategory" => array("devices" => array("description" => _("Devices"), "objectClass" => "gotoHotplugDevice")), "plProvidedAcls"=> array( - "cn" => _("Name")) + "cn" => _("Name"), + "base" => _("Base"), + "description" => _("Description"), + "type" => _("Tpye"), + "serial" => _("Serial"), + "vendor" => _("Vendor"), + "dev_id" => _("Devive ID")) )); } diff --git a/gosa-plugins/goto/admin/devices/deviceGeneric.tpl b/gosa-plugins/goto/admin/devices/deviceGeneric.tpl index 863851e44..25aac08c6 100644 --- a/gosa-plugins/goto/admin/devices/deviceGeneric.tpl +++ b/gosa-plugins/goto/admin/devices/deviceGeneric.tpl @@ -9,32 +9,40 @@ +{render acl=$baseACL} +{/render} {$must} +{render acl=$cnACL} +{/render} +{render acl=$descriptionACL} +{/render} - +{render acl=$typeACL} + +{/render} @@ -45,7 +53,9 @@ {$must} +{render acl=$dev_idACL} +{/render}   @@ -53,14 +63,18 @@ {$must} +{render acl=$vendorACL} +{/render} {$must} +{render acl=$serialACL} +{/render}