index 18f95aef3914979b9e15bf083de9f0ed5186c5c6..054c3dcb628980867480066f060554e938093f16 100644 (file)
/* Load Attributes */
plugin::plugin ($config, $dn);
- $this->acl ="#all#";
-
/* If "dn==new" we try to create a new entry
* Else we must read all objects from ldap which belong to this entry.
* First read SubObjects from ldap ... and then the partition definitions for the SubObjects.
*/
if($dn != "new"){
- /* Set acls
- */
- $ui = get_userinfo();
- $acl = get_permissions ($this->dn, $ui->subtreeACL);
- $acli = get_module_permission($acl, "FAIclass", $this->dn);
- $this->acl=$acli;
-
$this->dn =$dn;
/* Get FAIstate
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
- $this->dialog->acl = $this->acl;
+ $this->dialog->set_acl_base($_SESSION['CurrentMainBase']);
+ $this->dialog->set_acl_category("fai");
$this->is_dialog=true;
}
$obj = $this->get_object_attributes($obj,$this->sub_Load_Later);
}
$this->dialog= new $this->subClassName($this->config,$this->dn,$obj);
+ $this->dialog->set_acl_base($this->dn);
+ $this->dialog->set_acl_category("fai");
$_SESSION['objectinfo'] = $obj['dn'];
if((isset($_POST['EditSubObject']))&&(isset($_POST['SubObject']))){
$script = $_POST['SubObject'][0];
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$script]);
- $this->dialog->acl = $this->acl;
+ $this->dialog->set_acl_base($_SESSION['CurrentMainBase']);
+ $this->dialog->set_acl_category("fai");
$_SESSION['objectinfo'] = $this->SubObjects[$script]['dn'];
$this->is_dialog=true;
}
*/
$divlist = new divSelectBox("FAIscripts");
$divlist->setHeight(400);
- if((chkacl($this->acl,"cn")!="") || ($this->FAIstate == "freeze")){
+ if(($this->FAIstate == "freeze")){
$img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
$img_remo = "";
}else{
}
}
- foreach($this->attributes as $attr){
- $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ $tmp = $this->plInfo();
+ $this->ui = get_userinfo();
+
+ $c_dn = $this->dn;
+ if($c_dn == "new"){
+ $c_dn = $_SESSION['CurrentMainBase'];
+ }
+ $smarty->assign("sub_object_is_addable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiScriptEntry")) && $this->FAIstate!="freeze");
+ foreach($tmp['plProvidedAcls'] as $name => $translated){
+ $smarty->assign($name."ACL",$this->getacl($name));
}
$display.= $smarty->fetch(get_template_path('faiScript.tpl', TRUE));
"plSection" => array("administration"),
"plCategory" => array("fai"),
"plProvidedAcls" => array(
- "cn" => _("Name"),
- "description" => _("Description"),
- "FAIpriority" => _("Script priority"),
- "FAIscript" => _("FAI script"))
+ "cn" => _("Name")." ("._("Readonly").")",
+ "description" => _("Description"))
));
}
}