summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87880f8)
raw | patch | inline | side by side (parent: 87880f8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 6 Oct 2006 08:44:05 +0000 (08:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 6 Oct 2006 08:44:05 +0000 (08:44 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4868 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiHook.inc | patch | blob | history |
index f86302e93e26f8ddf762ce32b811b4f1b5d33fc7..141765b4595685ec07351f17f0ee3596d8f7cd59 100644 (file)
var $SubObjects = array(); // All leafobjects of this object
var $FAIstate = "";
+ var $ui;
function faiHook ($config, $dn= NULL)
{
$this->SubObjects[$objects['cn']] = $objects;
}
}
+ $this->ui = get_userinfo();
}
}
+ function acl_base_for_current_object($dn)
+ {
+ if($dn == "new"){
+ if($this->dn == "new"){
+ $dn= $_SESSION['CurrentMainBase'];
+ }else{
+ $dn = $this->dn;
+ }
+ }
+ return($dn);
+ }
+
+
function getUsedFAItask($cn)
{
$ret = array();
if($obj['status'] == "FreshLoaded"){
$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_base($this->acl_base_for_current_object($obj['dn']));
$this->dialog->set_acl_category("fai");
$_SESSION['objectinfo'] = $obj['dn'];
$this->is_dialog=true;
}
if(preg_match("/^deletescript_/",$name)&&($once)){
+ $entry = preg_replace("/^deletescript_/","",$name);
+ $entry = base64_decode(preg_replace("/_.*/","",$entry));
- $dn= $name['dn'];
- if($dn == "new"){
- $dn = $_SESSION['CurrentMainBase'];
- }
+ $dn = $this->acl_base_for_current_object($this->SubObjects[$entry]['dn']);
$acl = $this->ui -> get_permissions($dn,"fai/faiScriptEntry") ;
if(preg_match("/d/",$acl)){
$once = false;
- $entry = preg_replace("/^deletescript_/","",$name);
- $entry = base64_decode(preg_replace("/_.*/","",$entry));
if(($this->SubObjects[$entry]['status'] == "edited")||($this->SubObjects[$entry]['status'] == "FreshLoaded")){
$this->SubObjects[$entry]['status']= "delete";
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
- $c_dn = $this->dn;
- if($c_dn == "new"){
- $c_dn = $_SESSION['CurrentMainBase'];
- }
-
+ $c_dn = $this->acl_base_for_current_object($this->dn);
$this->dialog= new $this->subClassName($this->config,"new");
$this->dialog->set_acl_base($c_dn);
$this->dialog->set_acl_category("fai");
foreach($this->getList(true) as $key => $name){
- $dn= $name['dn'];
- if($dn == "new"){
- $dn = $_SESSION['CurrentMainBase'];
- }
- $ui = get_userinfo();
- $acl = $ui->get_permissions($dn,"fai/faiScriptEntry") ;
+ $dn= $this->acl_base_for_current_object($name['dn']);
+ $acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry") ;
$act = "";
if($this->FAIstate == "freeze"){
}
}
-
- $s_acl = $ui->get_permissions($dn,"fai/faiScriptEntry","FAIscript") ;
+ $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","FAIscript") ;
if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new") || !preg_match("/r/",$s_acl)){
$down = "";
}else{
}
$tmp = $this->plInfo();
- $this->ui = get_userinfo();
- $c_dn = $this->dn;
- if($c_dn == "new"){
- $c_dn = $_SESSION['CurrentMainBase'];
- }
-
+ $c_dn = $this->acl_base_for_current_object($this->dn);
$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 => $translation){
$smarty->assign($name."ACL",$this->getacl($name));