summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c68cb07)
raw | patch | inline | side by side (parent: c68cb07)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 09:35:47 +0000 (09:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 09:35:47 +0000 (09:35 +0000) |
- Fixed ACLs and freezed object handling
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11700 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11700 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index 377f3ee385df8dc9ff42d4b31b43c6d99dee637b..22fa65001b429606d7e824f705a9292b3442b9f6 100644 (file)
if($dn != "new"){
$this->dn =$dn;
- /* Get FAIstate
- */
- if(isset($this->attrs['FAIstate'][0])){
- $this->FAIstate = $this->attrs['FAIstate'][0];
- }
-
/* Read all leaf objects of this object (For FAIscript this would be FAIscriptEntry)
*/
$ldap = $this->config->get_ldap_link();
$display= "";
/* Add new sub object */
- if(isset($_POST['AddSubObject'])){
+ if(isset($_POST['AddSubObject']) && !preg_match("/freeze/i",$this->FAIstate)){
$this->dialog= new $this->subClassName($this->config,"new");
$this->dialog->set_acl_base($this->acl_base_for_current_object($this->dn));
$this->dialog->set_acl_category("fai");
$this->dialog->parent = &$this;
+ $this->dialog->FAIstate = $this->FAIstate;
$this->is_dialog=true;
}
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$var]);
$this->dialog->set_acl_category("fai");
$this->dialog->set_acl_base($c_dn);
+ $this->dialog->FAIstate = $this->FAIstate;
$this->dialog->parent = &$this;
session::set('objectinfo',$this->SubObjects[$var]['dn']);
$this->is_dialog=true;
}
/* Remove Sub object */
- if((isset($_POST['DelSubObject']))&&(isset($_POST['SubObject']))){
+ if((isset($_POST['DelSubObject']))&&(isset($_POST['SubObject'])) && !preg_match("/freeze/i",$this->FAIstate)){
foreach($_POST['SubObject'] as $var){
$c_dn = $this->acl_base_for_current_object($this->SubObjects[$var]['dn']);
}
/* Save Dialog */
- if(isset($_POST['SaveSubObject'])){
+ if(isset($_POST['SaveSubObject']) && !preg_match("/freeze/i",$this->FAIstate)){
$this->dialog->save_object();
$msgs = $this->dialog->check();
if(count($msgs)>0){
}
$c_dn = $this->acl_base_for_current_object($this->dn);
- $smarty->assign("is_createable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && !preg_match("/freeze/", $this->FAIstate));
+ $smarty->assign("is_createable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && !preg_match("/freeze/", $this->FAIstate));
$smarty->assign("is_removeable", preg_match("/d/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && !preg_match("/freeze/", $this->FAIstate));
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translation) {
- $smarty->assign($name."ACL",$this->getacl($name));
+ $smarty->assign($name."ACL",$this->getacl($name,preg_match("/freeze/i",$this->FAIstate)));
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc
index 50e7348203146fb3636108a4863770ad048318d7..a60d10e220307b74d09ca010c786bee93b80d7e1 100644 (file)
$oname = $name;
$this->$oname=addslashes($value);
}
-
- if(isset($this->attrs['FAIstate'][0])){
- $this->FAIstate = $this->attrs['FAIstate'][0];
- }
-
}else{
$this->status = "new";
$this->orig_cn = false;
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translated){
- $acl = $this->getacl($name);
- if($this->FAIstate == "freezed"){
- $acl = preg_replace("/w/","",$acl);
- }
+ $acl = $this->getacl($name, preg_match("/freeze/",$this->FAIstate));
$smarty->assign($name."ACL",$acl);
}
-
-
+ $smarty->assign("freeze",preg_match("/freeze/",$this->FAIstate));
$display.= $smarty->fetch(get_template_path('faiVariableEntry.tpl', TRUE));
return($display);
}
+
/* Save data to object */
function save_object()
{
diff --git a/gosa-plugins/fai/admin/fai/faiVariableEntry.tpl b/gosa-plugins/fai/admin/fai/faiVariableEntry.tpl
index f044cc5be28b982f4ca70d9619ddc088e279a108..e69797718916d4cca253a630973c16c266a19e14 100644 (file)
<p class="seperator"> </p>
<br>
<div style="align:right;" align="right">
+{if !$freeze}
<input type="submit" value="{msgPool type=applyButton}" name="SaveSubObject" >
+{/if}
<input type="submit" value="{msgPool type=cancelButton}" name="CancelSubObject">
</div>