summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ae0016c)
raw | patch | inline | side by side (parent: ae0016c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 08:44:01 +0000 (08:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 08:44:01 +0000 (08:44 +0000) |
-Updated ACL handling
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11697 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11697 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 3e495a9d5afe58c1e00846d2cbb04b9cb9a0ce80..7c08866ca461bca487610de3e28dce4ff11c6b75 100644 (file)
$this->dialog = new $a_setup[0]($this->config,$this->config->data['TABS'][$a_setup[2]],$this->dn,"fai");
$this->dialog->parent = &$this;
- $this->dialog->by_object[$a_setup[1]]->FAIstate = $entry['FAIstate'];;
+ $this->dialog->by_object[$a_setup[1]]->FAIstate = $entry['FAIstate'];
$this->dialog->set_acl_base($this->dn);
$this->is_dialog = true;
-
- if(preg_match("/^freeze/", $entry['FAIstate']) || $this->no_save){
-# $this->dialog->set_acl_base("freezed") ;
- }
session::set('objectinfo',$this->dn);
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index 9e33a5d884ad6a59b2ded89a30e04b7126a1262e..dec9e21e71da30ee6ecada1d0545a1bb303e4b82 100644 (file)
var $is_dialog = false; // specifies which buttons will be shown to save or abort
var $SubObjects = array(); // All leafobjects of this object
- var $FAIstate = "";
+ var $FAIstate = "branch";
var $sort_by = "name";
var $sort_order = "up";
$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->FAIstate = $this->FAIstate;
$this->dialog->set_acl_base($this->acl_base);
$this->dialog->set_acl_category("fai");
$this->dialog->parent = &$this;
}
/* Delete script requested */
- if(preg_match("/^deletescript_/",$name)){
+ if(preg_match("/^deletescript_/",$name) && preg_match("/freeze/i",$this->FAIstate)){
$s_action = "remove";
$s_entry = preg_replace("/^deletescript_/","",$name);
$s_entry = base64_decode(preg_replace("/_.*/","",$s_entry));
/* Create new dialog and set acl attributes */
$this->dialog= new $this->subClassName($this->config,$this->dn,$obj);
+ $this->dialog->FAIstate = $this->FAIstate;
$this->dialog->set_acl_base($this->acl_base_for_current_object($obj['dn']));
$this->dialog->set_acl_category("fai");
diff --git a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc
index a7a265eb16c6e45566795e9a724098b34bc4d06c..91c04d67bfba5905f459772c6d4c756ed264bb56 100644 (file)
$oname = $name;
$this->$oname=$value;
}
-
- if(isset($this->attrs['FAIstate'][0])){
- $this->FAIstate = $this->attrs['FAIstate'][0];
- }
-
}else{
if(is_array($object)&&count($object)){
$this->orig_cn= $object['cn'];
/* Fill templating stuff */
$smarty = get_smarty();
+ $smarty->assign("freeze", preg_match("/freeze/i",$this->FAIstate));
$display = "";
if(isset($_POST['ImportUpload']) && $this->acl_is_writeable("FAIscript")){
$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/i",$this->FAIstate));
$smarty->assign($name."ACL",$acl);
}
diff --git a/gosa-plugins/fai/admin/fai/faiScriptEntry.tpl b/gosa-plugins/fai/admin/fai/faiScriptEntry.tpl
index a01b2e776b59afcc7432439618d23585cda5603e..b25239f9186af3b72c9e2d1edf5bc54338b9a168 100644 (file)
</div>
<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>
<!-- Place cursor -->