summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ebc95d2)
raw | patch | inline | side by side (parent: ebc95d2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 6 Mar 2006 08:17:08 +0000 (08:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 6 Mar 2006 08:17:08 +0000 (08:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2811 594d385d-05f5-0310-b6e9-bd551577e9d8
25 files changed:
index eef163f8828b8e304e712cbf6bcfe14fc8037b49..7dd077eb15cc669b2c1ef5bf2e8cf1bc92aa0f78 100644 (file)
var $dialog = NULL; // a dialog, e.g. new disk dialog
var $SubObjects = array(); // All leafobjects of this object
+ var $FAIstate = "";
+
function faiHook ($config, $dn= NULL)
{
/* 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.
*/
if($dn != "new"){
$this->dn =$dn;
+
+ /* Set acls
+ */
+ $ui = get_userinfo();
+ $acl = get_permissions ($this->dn, $ui->subtreeACL);
+ $acli = get_module_permission($acl, "FAIclass", $this->dn);
+ $this->acl=$acli;
+
+ /* 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)
*/
while($object = $ldap->fetch()){
/* Set status for save management */
-
+
foreach($this->subAttributes as $attrs){
if(!isset($object[$attrs][0])){
$this->SubObjects[$object['cn'][0]][$attrs]="";
$this->SubObjects[$object['cn'][0]][$attrs]=$object[$attrs][0];
}
}
-
+
$this->SubObjects[$object['cn'][0]]['status'] = "edited";
$this->SubObjects[$object['cn'][0]]['dn'] = $object['dn'];
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty= get_smarty();
$entry = preg_replace("/^editscript_/","",$name);
$entry = base64_decode(preg_replace("/_.*/","",$entry));
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$entry]);
+ $this->dialog->acl = $this->acl;
$_SESSION['objectinfo'] = $this->SubObjects[$entry]['dn'];
$this->dialog->parent = &$this;
$this->is_dialog=true;
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
+ $this->dialog->acl = $this->acl;
$this->dialog->parent = &$this;
$this->is_dialog=true;
}
-
+
if($this->dn != "new"){
$_SESSION['objectinfo']= $this->dn;
}
/* Edit selected Sub Object */
if((isset($_POST['EditSubObject']))&&(isset($_POST['SubObject']))){
$hook = $_POST['SubObject'][0];
-
+
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$hook]);
+ $this->dialog->acl = $this->acl;
$this->dialog->parent = &$this;
$_SESSION['objectinfo'] = $this->SubObjects[$hook]['dn'];
$this->is_dialog=true;
}
-
+
/* Remove Sub object */
if((isset($_POST['DelSubObject']))&&(isset($_POST['SubObject']))){
foreach($_POST['SubObject'] as $hook){
}
-
+
/* Divlist added 28.02.2006
Containing FAIscripts
*/
+
$divlist = new divSelectBox("FAIhooks");
- $img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
- $img_remo = "<input type='image' src='images/edittrash.png' name='deletescript_%s' title='"._("delete")."' alt='"._("delete")."'>";
+ if((chkacl($this->acl,"cn")!="") || ($this->FAIstate == "freeze")){
+ $img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $img_remo = "";
+ }else{
+ $img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $img_remo = "<input type='image' src='images/edittrash.png' name='deletescript_%s' title='"._("delete")."' alt='"._("delete")."'>";
+ }
foreach($this->getList(true) as $key => $name){
$down = "";
}else{
$down = "<a href='getFAIscript.php?id=".base64_encode($name['dn'])."' target='_blank'>
- <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0>
- </a>";
+ <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0>
+ </a>";
}
$divlist->AddEntry(array( array("string"=>$name['name']),
- array("string"=>$down , "attach" => "style='width:20px;'"),
- array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),
- "attach"=>"style='border-right: 0px;width:50px;text-align:right;'")));
+ array("string"=>$down , "attach" => "style='width:20px;'"),
+ array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),
+ "attach"=>"style='border-right: 0px;width:50px;text-align:right;'")));
}
$smarty->assign("Entry_divlist",$divlist->DrawList());
/* Divlist creation complete
*/
-
-
-
$smarty->assign("SubObjects",$this->getList());
$smarty->assign("SubObjectKeys",array_flip($this->getList()));
- /* Magic quotes GPC, escapes every ' " \, to solve some security risks
+ /* Magic quotes GPC, escapes every ' " \, to solve some security risks
* If we post the escaped strings they will be escaped again
*/
foreach($this->attributes as $attrs){
}
}
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ }
+
$display.= $smarty->fetch(get_template_path('faiHook.tpl', TRUE));
return($display);
}
/* Generate listbox friendly SubObject list
- */
+ */
function getList($use_dns=false){
$a_return=array();
foreach($this->SubObjects as $obj){
*/
function save_object()
{
- if(isset($_POST['FAIhook_posted'])){
+ if((isset($_POST['FAIhook_posted'])) && ($this->FAIstate != "freeze")){
plugin::save_object();
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
function save()
{
plugin::save();
-
+
$ldap = $this->config->get_ldap_link();
$ldap->cat($this->dn);
/* Write FAIscript to ldap*/
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
}else{
/* Write FAIscript to ldap*/
$ldap->add($this->attrs);
}
show_ldap_error($ldap->get_error());
-
+
/* Prepare FAIscriptEntry to write it to ldap
* First sort array.
* Because we must delete old entries first.
$obj['status']="modify";
}
}
-
+
if($obj['status'] == "delete"){
$ldap->cd($sub_dn);
$ldap->rmdir_recursive($sub_dn);
}elseif($obj['status'] == "edited"){
$ldap->cd($sub_dn);
$this->cleanup();
-$ldap->modify ($tmp);
+ $ldap->modify ($tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
show_ldap_error($ldap->get_error());
}
}
-
+
function readBinary($attr,$dn){
$Data ="";
$ds= ldap_connect($this->config->current['SERVER']);
index 83396e99214b69922e0ca0744cb0c14042d09b3c..8a7f0c990cef0ef446a8b78c42123af350945d1f 100644 (file)
var $FAIscript = "";
var $description = "";
var $status = "new";
+
+ var $FAIstate = "";
function faiHookEntry ($config, $dn= NULL,$object=false)
{
$oname = $name;
$this->$oname=$value;
}
+
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
+
}elseif(is_array($object)){
if(count($object)){
$this->orig_cn= $object['cn'];
}
}
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
$display.= $smarty->fetch(get_template_path('faiHookEntry.tpl', TRUE));
return($display);
}
/* Save data to object */
function save_object()
{
- if(isset($_POST['SubObjectFormSubmitted'])){
+ if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
$this->$attrs = $_POST[$attrs];
index 9ca356db27df040b2cdd04719c6e3dd0dd1b6583..3a03dfecff4722ab19673ec52923302c4b47a74a 100644 (file)
$this->dialog= new $a_setup[0]($this->config,
$this->config->data['TABS'][$a_setup[2]],$this->dn);
$this->is_dialog = true;
+ if($entry['FAIstate'] == "freeze"){
+ $this->dialog->set_acl(array("*none*")) ;
+ }
$_SESSION['objectinfo'] = $this->dn;
}
-
/* Branch handling
09.01.2006
*/
}
if($value['FAIstate'] == "freeze"){
- $acti = "";
- $edi = "%NAME%";
+ $action = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
+ name='entry_edit_%KEY%' title='"._("Edit class")."'>";
+ $edi = $editlink;
+ $acti = $action;
}else{
+ $action = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
+ name='entry_edit_%KEY%' title='"._("Edit class")."'>";
+ $action .= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'
+ name='entry_delete_%KEY%' title='"._("Delete class")."'>";
$acti = $action;
$edi = $editlink;
}
index 1540bb748111efaf31edc3213d17a608367517cf..bf9b32ba937d86391dad6d4a85cf2122a821f7a0 100644 (file)
var $strID ="";
var $newDialogShown =false;
+ var $FAIstate = "";
+
function faiPackage ($config, $dn= NULL)
{
/* 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"){
$this->dn =$dn;
+
+ /* Set acls
+ */
+ $ui = get_userinfo();
+ $acl = get_permissions ($this->dn, $ui->subtreeACL);
+ $acli = get_module_permission($acl, "FAIclass", $this->dn);
+ $this->acl=$acli;
+
+ /* Get FAIstate
+ */
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
}
if(isset($this->attrs['FAIpackage'])){
/* Delte selected package */
if(isset($_POST['Delpkg'])){
- foreach($_POST['usedPackages'] as $del){
- if(isset($this->usedPackages[$del])){
- unset($this->usedPackages[$del]);
+ if($this->FAIstate != "freeze"){
+ foreach($_POST['usedPackages'] as $del){
+ if(isset($this->usedPackages[$del])){
+ unset($this->usedPackages[$del]);
+ }
}
}
}
/* attach new packages */
if(isset($_POST['SaveSubObject'])) {
- $this->dialog->save_object();
- if(count($this->dialog->check())){
- foreach($this->dialog->check() as $msgs){
- print_red($msgs);
+ if($this->FAIstate != "freeze"){
+ $this->dialog->save_object();
+ if(count($this->dialog->check())){
+ foreach($this->dialog->check() as $msgs){
+ print_red($msgs);
+ }
+ }else{
+ $use = $this->dialog->save();
+ $this->usedPackages = $use;
+ $this->dialog = false;
+ $this->is_dialog=false;
+ ksort($this->usedPackages);
}
}else{
- $use = $this->dialog->save();
- $this->usedPackages = $use;
$this->dialog = false;
$this->is_dialog=false;
- ksort($this->usedPackages);
}
}
}
$this->dialog = new faiPackageConfiguration($this->config, $this->dn,$pkg, $path, $pkg_config);
+ $this->dialog ->acl = $this->acl;
$this->is_dialog =true;
}
/* Save Configuration */
if(isset($_POST['SaveObjectConfig'])){
- $this->ConfiguredPackages= array_merge($this->ConfiguredPackages,$this->dialog->save());
+ if($this->FAIstate != "freeze"){
+ $this->ConfiguredPackages= array_merge($this->ConfiguredPackages,$this->dialog->save());
+ }
$this->dialog = false;
$this->is_dialog=false;
}
$strsec .= $sec." ";
}
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ }
+
$smarty->assign("OptionsACL","");
$smarty->assign("releases",$this->releases);
*/
function save_object()
{
-
+
+ if($this->FAIstate == "freeze") return;
plugin::save_object();
+
+
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
$this->$attrs = $_POST[$attrs];
diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index 77b2e76e83075ce9da883a78eb31e6cc7e1d5739..b5ea44e3bb5a941c4bcb2ff0cc24b659964a3093 100644 (file)
var $is_dialog = false; // specifies which buttons will be shown to save or abort
var $dialog = NULL; // a dialog, e.g. new disk dialog
+ var $FAIstate = "";
+
function faiPartitionTable ($config, $dn= NULL)
{
/* 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 disks from ldap ... and then the partition definitions for the disks.
if($dn != "new"){
$this->dn =$dn;
+ /* Set acls
+ */
+ $ui = get_userinfo();
+ $acl = get_permissions ($this->dn, $ui->subtreeACL);
+ $acli = get_module_permission($acl, "FAIclass", $this->dn);
+ $this->acl=$acli;
+
+ /* Get FAIstate
+ */
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
+
/* Read all disks from ldap taht are defined fot this partition table
*/
$ldap = $this->config->get_ldap_link();
$usedDiskNames[]= $key;
}
$this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames);
+ $this->dialog->acl = $this->acl;
+ $this->dialog->FAIstate = $this->FAIstate;
$this->is_dialog = true;
}
}
}
$this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$usedDiskNames,$this->disks[$Udisk]);
+ $this->dialog->acl = $this->acl;
+ $this->dialog->FAIstate = $this->FAIstate;
$_SESSION['objectinfo'] = $this->disks[$Udisk]['dn'];
$this->is_dialog = true;
}
$this->dialog = NULL;
$this->is_dialog=false;
}
-
+
/* Dialog saved
* Save given data from Dialog, if no error is occured
*/
if(isset($_POST['SaveDisk'])){
- $this->dialog->save_object();
- if(count($this->dialog->check())){
- foreach($this->dialog->check() as $msg){
- print_red($msg);
- }
- }else{
- $disk = $this->dialog->save();
- if(isset($disk['rename'])){
- if($this->disks[$disk['rename']['from']]['status']=="edited"){
- $this->disks[$disk['rename']['from']]['status']="delete";
- }else{
- unset($this->disks[$disk['rename']['from']]);
+
+ if($this->FAIstate != "freeze"){
+ $this->dialog->save_object();
+ if(count($this->dialog->check())){
+ foreach($this->dialog->check() as $msg){
+ print_red($msg);
}
-
- foreach($disk['partitions'] as $key => $val){
- if($disk['partitions'][$key]['status']!="delete"){
- $disk['partitions'][$key]['status']= "new";
+ }else{
+ $disk = $this->dialog->save();
+ if(isset($disk['rename'])){
+ if($this->disks[$disk['rename']['from']]['status']=="edited"){
+ $this->disks[$disk['rename']['from']]['status']="delete";
+ }else{
+ unset($this->disks[$disk['rename']['from']]);
}
+
+ foreach($disk['partitions'] as $key => $val){
+ if($disk['partitions'][$key]['status']!="delete"){
+ $disk['partitions'][$key]['status']= "new";
+ }
+ }
+
+ $disk['status']="new";
+ $disk['cn']= $disk['rename']['to'];
}
- $disk['status']="new";
- $disk['cn']= $disk['rename']['to'];
+ $this->disks[$disk['cn']]=$disk;
+ unset($this->dialog);
+ $this->dialog = NULL;
+ $this->is_dialog=false;
+ ksort($this->disks);
}
-
- $this->disks[$disk['cn']]=$disk;
- unset($this->dialog);
+ }else{
$this->dialog = NULL;
$this->is_dialog=false;
- ksort($this->disks);
}
}
* Assign delete status for all its partitions
*/
if((isset($_POST['DelDisk']))&&(!empty($_POST['disks']))){
-
- foreach($_POST['disks'] as $disk) {
- if($this->disks[$disk]['status']=="edited"){
- $this->disks[$disk."-delete"]=$this->disks[$disk];
- unset($this->disks[$disk]);
- $disk = $disk."-delete";
- $this->disks[$disk]['status']="delete";
- foreach($this->disks[$disk]['partitions'] as $name => $value ){
- if($value['status']=="edited"){
- $this->disks[$disk]['partitions'][$name]['status']="delete";
- }else{
- unset($this->disks[$disk]['partitions'][$name]);
+ if($this->FAIstate != "freeze"){
+ foreach($_POST['disks'] as $disk) {
+ if($this->disks[$disk]['status']=="edited"){
+ $this->disks[$disk."-delete"]=$this->disks[$disk];
+ unset($this->disks[$disk]);
+ $disk = $disk."-delete";
+ $this->disks[$disk]['status']="delete";
+ foreach($this->disks[$disk]['partitions'] as $name => $value ){
+ if($value['status']=="edited"){
+ $this->disks[$disk]['partitions'][$name]['status']="delete";
+ }else{
+ unset($this->disks[$disk]['partitions'][$name]);
+ }
}
+ }else{
+ unset($this->disks[$disk]);
}
- }else{
- unset($this->disks[$disk]);
}
}
}
$smarty->assign($attrs."CHK"," disabled ");
}
}
-
+
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ }
+
$disks = $this->getDisks();
$smarty->assign("disks" ,$disks);
$smarty->assign("diskKeys",array_flip($disks));
*/
function save_object()
{
+ if($this->FAIstate == "freeze") return;
plugin::save_object();
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
diff --git a/plugins/admin/fai/class_faiPartitionTableEntry.inc b/plugins/admin/fai/class_faiPartitionTableEntry.inc
index 408b361d20d06518fdd8020bdf5a96fea49efcbe..83e7a179cfbb2b268ed40386e985ef3c76cd8af5 100644 (file)
var $status = "new";
var $deletePartitions = array();
+ var $FAIstate = "";
+
function faiPartitionTableEntry ($config, $dn= NULL,$usedDiskNames=array(),$disk=false)
{
plugin::plugin ($config, $dn);
$smarty->assign($attr,$this->$attr);
}
+ foreach($this->UsedAttrs as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
+
/* The user can't change a diskname
* if we are currently in edit mode for the specified disk
*/
$smarty->assign("DISK_cnACL","");
// }
+
+
/* Fetch template and show the result
*/
$display.= $smarty->fetch(get_template_path('faiPartitionTableEntry.tpl', TRUE));
$dis = " disabled ";
}
+ $disableALL = "";
+ if($this->FAIstate =="freeze"){
+ $disableALL = " disabled ";
+ }
+
if($part['status']!="delete"){
/* Generate Partition select box
*/
- $PartitionType = "<select name='FAIpartitionType_".$key."' id='FAIpartitionType_".$key."' >";
+ $PartitionType = "<select name='FAIpartitionType_".$key."' id='FAIpartitionType_".$key."' ".$disableALL.">";
foreach($PartitionTypes as $type){
if($part['FAIpartitionType'] == $type){
$PartitionType .="<option value='".$type."' selected >".$type."</option>";
/* Generate fsType select box
*/
- $FAIfsType= "<select name='FAIfsType_".$key."' id='FAIfsType_".$key."' ".$dis.">";
+ $FAIfsType= "<select name='FAIfsType_".$key."' id='FAIfsType_".$key."' ".$dis." ".$disableALL.">";
foreach($FAIfsTypes as $type){
if($part['FAIfsType'] == $type){
$FAIfsType .="<option value='".$type."' selected >".$type."</option>";
$str .= "\n<tr>";
$str .= "\n<td>".$PartitionType."</td>";
$str .= "\n<td>".$FAIfsType."</td>";
- $str .= "\n<td><input name='FAImountPoint_".$key."' ".$dis." value='".$part['FAImountPoint']."' id='FAImountPoint_".$key."'></td>";
- $str .= "\n<td><input name='FAIpartitionSize_".$key."' ".$dis." value='".$part['FAIpartitionSize']."' id='FAIpartitionSize_".$key."' size=12></td>";
- $str .= "\n<td><input name='FAImountOptions_".$key."' ".$dis." value='".$part['FAImountOptions']."' id='FAImountOptions_".$key."' style='width:100px;'></td>";
- $str .= "\n<td><input name='FAIfsOptions_".$key."' ".$dis." value='".$part['FAIfsOptions']."' id='FAIfsOptions_".$key."' style='width:100px;'></td>";
+ $str .= "\n<td><input name='FAImountPoint_".$key."' ".$disableALL." ".$dis." value='".$part['FAImountPoint']."' id='FAImountPoint_".$key."'></td>";
+ $str .= "\n<td><input name='FAIpartitionSize_".$key."' ".$disableALL." ".$dis." value='".$part['FAIpartitionSize']."' id='FAIpartitionSize_".$key."' size=12></td>";
+ $str .= "\n<td><input name='FAImountOptions_".$key."' ".$disableALL." ".$dis." value='".$part['FAImountOptions']."' id='FAImountOptions_".$key."' style='width:100px;'></td>";
+ $str .= "\n<td><input name='FAIfsOptions_".$key."' ".$disableALL." ".$dis." value='".$part['FAIfsOptions']."' id='FAIfsOptions_".$key."' style='width:100px;'></td>";
$changeState = "onClick=\"changeState('FAImountPoint_".$key."') ; ".
"changeState('FAIpartitionSize_".$key."') ; ".
if($part['FAIpartitionFlags']!=false){
- $str .= "\n<td><input type='checkbox' name='FAIpartitionFlags_".$key."' value='preserve' checked ".$changeState."></td>";
+ $str .= "\n<td><input type='checkbox' name='FAIpartitionFlags_".$key."' value='preserve' checked ".$changeState." ".$disableALL."></td>";
}else{
- $str .= "\n<td><input type='checkbox' name='FAIpartitionFlags_".$key."' value='preserve' ".$changeState."></td>";
+ $str .= "\n<td><input type='checkbox' name='FAIpartitionFlags_".$key."' value='preserve' ".$changeState." ".$disableALL."></td>";
}
- $str .= "\n<td><input type='submit' name='Delete_".$key."' value='"._("Remove")."'></td>";
+ $str .= "\n<td><input type='submit' name='Delete_".$key."' value='"._("Remove")."' ".$disableALL."></td>";
$str .= "\n</tr>";
}
}
/* Save data to object */
function save_object()
{
- if(isset($_POST['TableEntryFrameSubmitted'])){
+ if((isset($_POST['TableEntryFrameSubmitted'])) && ($this->FAIstate != "freeze") ){
plugin::save_object();
/* Check base attributes */
index c3c6d052bdf2760e0cb7cbb7e33dd5c89b41bc5a..6df1f06a5345b83b85cb5db120d4fee91719b352 100644 (file)
var $FAIclasses = array(); // Contains classname seperated in an array
var $FAIAllclasses = array(); // Contains all possible Classnames
+ var $FAIstate = "";
+
function faiProfile($config, $dn= NULL)
{
/* Load Attributes */
plugin::plugin ($config, $dn);
$ldap=$this->config->get_ldap_link();
+ $this->acl = "#all#";
+
+ if($this->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;
+ }
+
/* Parse ldap attribute to get all assigned classes */
$tmp = split(" ",$this->FAIclass);
$tmp2 = array();
$tmp2[trim($class)] = trim($class);
}
}
-
+
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
+
/* Sort assigned classes */
if(is_array($tmp2)){
foreach($tmp2 as $class){
$field1 = array("string"=> $usedClass,"attach"=>"");
$field2 = array("string"=> $str,"attach"=>"");
- $field3 = array("string"=> preg_replace("/%KEY%/",base64_encode($usedClass),$actions).preg_replace("/%s/",base64_encode($usedClass),$linkupdown),"attach"=>"style='border-right:none;'");
+ if($this->FAIstate != "freeze"){
+ $field3 = array("string"=> preg_replace("/%KEY%/",base64_encode($usedClass),$actions).
+ preg_replace("/%s/",base64_encode($usedClass),$linkupdown),
+ "attach"=>"style='border-right:none;'");
+ }else{
+ $field3 = array("string"=>" ", "attach"=>"style='border-right:none;'");
+ }
$divlist->AddEntry(array($field1,$field2,$field3));
}
}
}
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
$display.= $smarty->fetch(get_template_path('faiProfile.tpl', TRUE));
return($display);
index 08859d81615720686d424ca00568ba3bcabd378e..c8bc4d80272fc66e402b34d01d0287ddfba22b26 100644 (file)
var $dialog = NULL; // a dialog, e.g. new disk dialog
var $SubObjects = array(); // All leafobjects of this object
+ var $FAIstate ="";
+
function faiScript ($config, $dn= NULL)
{
/* 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
+ */
+ 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();
while($object = $ldap->fetch()){
/* Set status for save management */
-
+
foreach($this->subAttributes as $attrs){
if(!isset($object[$attrs][0])){
$this->SubObjects[$object['cn'][0]][$attrs]="";
$this->SubObjects[$object['cn'][0]][$attrs]=$object[$attrs][0];
}
}
-
+
foreach($this->sub64coded as $codeIt){
$this->SubObjects[$object['cn'][0]][$codeIt]=(base64_decode($this->SubObjects[$object['cn'][0]][$codeIt]));
}
}
$this->SubObjects[$object['cn'][0]]['FAIscript'] = addslashes ($this->readBinary("FAIscript",$object['dn']));
-
+
$this->SubObjects[$object['cn'][0]]['status'] = "edited";
$this->SubObjects[$object['cn'][0]]['dn'] = $object['dn'];
}
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty= get_smarty();
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
+ $this->dialog->acl = $this->acl;
$this->is_dialog=true;
}
$entry = preg_replace("/^editscript_/","",$name);
$entry = base64_decode(preg_replace("/_.*/","",$entry));
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$entry]);
+ $this->dialog->acl = $this->acl;
$_SESSION['objectinfo'] = $this->SubObjects[$entry]['dn'];
$this->is_dialog=true;
}
}
}
///// Ende new list handling
-
+
/* Edit selected Sub Object */
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;
$_SESSION['objectinfo'] = $this->SubObjects[$script]['dn'];
$this->is_dialog=true;
}
-
+
/* Remove Sub object */
if((isset($_POST['DelSubObject']))&&(isset($_POST['SubObject']))){
Containing FAIscripts
*/
$divlist = new divSelectBox("FAIscripts");
- $img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
- $img_remo = "<input type='image' src='images/edittrash.png' name='deletescript_%s' title='"._("delete")."' alt='"._("delete")."'>";
+ if((chkacl($this->acl,"cn")!="") || ($this->FAIstate == "freeze")){
+ $img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $img_remo = "";
+ }else{
+ $img_edit = "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $img_remo = "<input type='image' src='images/edittrash.png' name='deletescript_%s' title='"._("delete")."' alt='"._("delete")."'>";
+ }
foreach($this->getList(true) as $key => $name){
-
+
if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new")){
$down = "";
}else{
$down = "<a href='getFAIscript.php?id=".base64_encode($name['dn'])."' target='_blank'>
- <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0>
- </a>";
+ <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0>
+ </a>";
}
$divlist->AddEntry(array( array("string"=>$name['name']),
- array("string"=>$down , "attach" => "style='width:20px;'"),
- array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),
- "attach"=>"style='border-right: 0px;width:50px;text-align:right;'")));
+ array("string"=>$down , "attach" => "style='width:20px;'"),
+ array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),
+ "attach"=>"style='border-right: 0px;width:50px;text-align:right;'")));
}
$smarty->assign("Entry_divlist",$divlist->DrawList());
/* Divlist creation complete
$smarty->assign("SubObjects",$this->getList());
$smarty->assign("SubObjectKeys",array_flip($this->getList()));
-
+
/* Magic quotes GPC, escapes every ' " \, to solve some security risks
- * If we post the escaped strings they will be escaped again
- */
+ * If we post the escaped strings they will be escaped again
+ */
foreach($this->attributes as $attrs){
if(get_magic_quotes_gpc()){
$smarty->assign($attrs,stripslashes($this->$attrs));
}
}
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ }
+
$display.= $smarty->fetch(get_template_path('faiScript.tpl', TRUE));
return($display);
}
/* Generate listbox friendly SubObject list
- */
+ */
function getList($use_dns=false){
$a_return=array();
foreach($this->SubObjects as $obj){
*/
function save_object()
{
- if(isset($_POST['FAIscript_posted'])){
+ if((isset($_POST['FAIscript_posted'])) && ($this->FAIstate != "freeze")){
plugin::save_object();
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
function save()
{
plugin::save();
-
+
$ldap = $this->config->get_ldap_link();
-
+
$ldap->cat($this->dn);
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
}else{
/* Write FAIscript to ldap*/
$ldap->add($this->attrs);
}
show_ldap_error($ldap->get_error());
-
+
/* Prepare FAIscriptEntry to write it to ldap
* First sort array.
* Because we must delete old entries first.
$tmp[$attrs] = $obj[$attrs];
}
}
-
+
$tmp['objectClass'] = $this->subClasses;
$sub_dn = "cn=".$obj['cn'].",".$this->dn;
if(empty($tmp['FAIpriority'])){
$tmp['FAIpriority'] ="0";
}
-
+
if($obj['status'] == "delete"){
$ldap->cd($sub_dn);
$ldap->rmdir_recursive($sub_dn);
}elseif($obj['status'] == "edited"){
$ldap->cd($sub_dn);
$this->cleanup();
-$ldap->modify ($tmp);
+ $ldap->modify ($tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
diff --git a/plugins/admin/fai/class_faiScriptEntry.inc b/plugins/admin/fai/class_faiScriptEntry.inc
index f52c123c5671ace45eb057bb540b64450f2ce0f8..91fa11ff71f34b47cd8f2c6f06ed1ed7baf54d4c 100644 (file)
var $description = "";
var $status = "new";
+ var $FAIstate = "";
function faiScriptEntry ($config, $dn= NULL,$object=false)
{
$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'];
for($i =0 ; $i < 100 ; $i++){
$FAIprioritys[$i]=$i;
}
+
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
$smarty->assign("FAIprioritys",$FAIprioritys);
$display.= $smarty->fetch(get_template_path('faiScriptEntry.tpl', TRUE));
return($display);
/* Save data to object */
function save_object()
{
- if(isset($_POST['SubObjectFormSubmitted'])){
+ if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
$this->$attrs = $_POST[$attrs];
index 10f81c719542047b246f5f68c7dd0987689b1538..279050b4625e5305d017297b7d147fbb487a1306 100644 (file)
var $dialog = NULL; // a dialog, e.g. new disk dialog
var $SubObjects = array(); // All leafobjects of this object
+ var $FAIstate = "";
+
function faiTemplate ($config, $dn= NULL)
{
/* 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"){
$this->dn =$dn;
+ /* Set acls
+ */
+ $ui = get_userinfo();
+ $acl = get_permissions ($this->dn, $ui->subtreeACL);
+ $acli = get_module_permission($acl, "FAIclass", $this->dn);
+ $this->acl=$acli;
+
+ /* 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();
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
+ $this->dialog->acl = $this->acl;
$this->is_dialog=true;
}
$temp = $_POST['SubObject'][0];
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$temp]);
+ $this->dialog->acl = $this->acl;
$_SESSION['objectinfo'] = $this->SubObjects[$temp]['dn'];
$this->is_dialog=true;
}
}
}
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ }
$display.= $smarty->fetch(get_template_path('faiTemplate.tpl', TRUE));
return($display);
*/
function save_object()
{
- if(isset($_POST['FAItemplate_posted'])){
+ if((isset($_POST['FAItemplate_posted'])) && ($this->FAIstate != "freeze") ){
plugin::save_object();
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
function save()
{
plugin::save();
-
+
$ldap = $this->config->get_ldap_link();
-
+
$ldap->cat($this->dn);
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
}else{
/* Write FAIscript to ldap*/
$ldap->add($this->attrs);
}
show_ldap_error($ldap->get_error());
-
+
/* Prepare FAIscriptEntry to write it to ldap
* First sort array.
* Because we must delete old entries first.
diff --git a/plugins/admin/fai/class_faiTemplateEntry.inc b/plugins/admin/fai/class_faiTemplateEntry.inc
index 33b361992a1877d1ad5d60e88b217113a469ee24..33092b851090f5db527b715769b84331750b0802 100644 (file)
var $user = "root";
var $group = "root";
var $binary = false;
+
+ var $FAIstate = "";
function faiTemplateEntry ($config, $dn= NULL,$object=false)
{
$oname = $name;
$this->$oname=$value;
}
+
+ if(isset($this->attrs['FAIstate'][0])){
+ $this->FAIstate = $this->attrs['FAIstate'][0];
+ }
+
}else{
$this->status = "new";
$this->orig_cn = false;
$smarty->assign("FAItemplateFile","");
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
$display.= $smarty->fetch(get_template_path('faiTemplateEntry.tpl', TRUE));
return($display);
}
if (!isset($_POST['FAItemplatePath'])){
return;
}
- if(isset($_POST['SubObjectFormSubmitted'])){
+ if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
foreach($this->attributes as $attrs){
if($attrs == "FAItemplateFile")
continue;
$this->$attrs = "";
}
}
- }
-
- /* Save mode */
- $tmode= "";
- foreach (array("s", "u", "g", "o") as $type){
- $nr= 1;
- $dest= 0;
- while ($nr < 5){
- if (isset($_POST["$type$nr"])){
- $dest+= $nr;
+ /* Save mode */
+ $tmode= "";
+ foreach (array("s", "u", "g", "o") as $type){
+ $nr= 1;
+ $dest= 0;
+ while ($nr < 5){
+ if (isset($_POST["$type$nr"])){
+ $dest+= $nr;
+ }
+ $nr+= $nr;
}
- $nr+= $nr;
+ $tmode= $tmode.$dest;
}
- $tmode= $tmode.$dest;
+ $this->FAImode= $tmode;
}
- $this->FAImode= $tmode;
}
/* Check supplied data */
index f6c4a5562658d6e832de1c1d3d5d1dc7c93c3d56..baa760623810ce89323f695b221bcc1f95f318e8 100644 (file)
var $dialog = NULL; // a dialog, e.g. new disk dialog
var $SubObjects = array(); // All leafobjects of this object
+ var $FAIstate = "";
+
function faiVariable ($config, $dn= NULL)
{
/* 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"){
$this->dn =$dn;
+ /* Set acls
+ */
+ $ui = get_userinfo();
+ $acl = get_permissions ($this->dn, $ui->subtreeACL);
+ $acli = get_module_permission($acl, "FAIclass", $this->dn);
+ $this->acl=$acli;
+
+ /* 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();
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
+ $this->dialog->acl = $this->acl;
$this->is_dialog=true;
}
$var = $_POST['SubObject'][0];
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$var]);
+ $this->dialog->acl = $this->acl;
$_SESSION['objectinfo'] = $this->SubObjects[$var]['dn'];
$this->is_dialog=true;
}
}
}
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ }
+
+
$display.= $smarty->fetch(get_template_path('faiVariable.tpl', TRUE));
return($display);
}
*/
function save_object()
{
- if(isset($_POST['FAIvariable_posted'])){
+ if((isset($_POST['FAIvariable_posted'])) && ($this->FAIstate != "freeze") ){
plugin::save_object();
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
diff --git a/plugins/admin/fai/class_faiVariableEntry.inc b/plugins/admin/fai/class_faiVariableEntry.inc
index f367315026db30f7af6f4bf136aacb228cd9a0ed..12c66fe134ee651930a721d4217b784157387784 100644 (file)
var $FAIvariableContent = "";
var $description = "";
var $status = "new";
+
+ var $FAIstate = "";
function faiVariableEntry ($config, $dn= NULL,$object=false)
{
$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;
}
}
+ foreach($this->attributes as $attr){
+ if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){
+ $smarty->assign($attr."ACL"," disabled ");
+ }else{
+ $smarty->assign($attr."ACL"," ");
+ }
+ }
+
$display.= $smarty->fetch(get_template_path('faiVariableEntry.tpl', TRUE));
return($display);
}
/* Save data to object */
function save_object()
{
- if(isset($_POST['SubObjectFormSubmitted'])){
+ if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
foreach($this->attributes as $attrs){
if(isset($_POST[$attrs])){
$this->$attrs = $_POST[$attrs];
index 68f2c913277a5322c94f75f2f8154e55299d0500..3bd5c80b1ba127e5b6ea22284a7823997a5d540c 100644 (file)
</LABEL>
</td>
<td>
- <input value="{$cn}" size="45" maxlength="80" disabled id="cn">
+ <input value="{$cn}" size="45" maxlength="80" disabled id="cn" {$cnACL}>
</td>
</tr>
<tr>
</LABEL>
</td>
<td>
- <input value="{$description}" size="45" maxlength="80" {$description} name="description" id="description">
+ <input value="{$description}" size="45" maxlength="80" {$descriptionACL} name="description" id="description">
</td>
</tr>
</table>
<input type="submit" name="EditSubObject" value="{t}Edit{/t}" title="{t}Edit{/t}">
<input type="submit" name="DelSubObject" value="{t}Delete{/t}" title="{t}Delete{/t}">
-->
- <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}">
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}" {$cnACL}>
</td>
</tr>
</table>
index 699528a40c147219d780276fddfe124eabaa7d99..ad25455ce0f51fa7594c614c8323b29df3c78ce4 100644 (file)
{t}Name{/t}{$must}
</td>
<td>
- <input value="{$cn}" size="45" name="cn">
+ <input value="{$cn}" size="45" name="cn" {$cnACL}>
</td>
</tr>
<tr>
{t}Description{/t}
</td>
<td>
- <input value="{$description}" size="45" name="description">
+ <input value="{$description}" size="45" name="description" {$descriptionACL}>
</td>
</tr>
</table>
<LABEL for="FAItask">
{t}Task{/t}
</LABEL>
- <select name="FAItask" title="{t}Choose an existing FAI task{/t}">
+ <select name="FAItask" title="{t}Choose an existing FAI task{/t}" {$FAItaskACL}>
{html_options values=$tasks output=$tasks selected=$FAItask}
</select>
</td>
<table width="99%" summary="">
<tr>
<td>
- <textarea name="FAIscript" style="width:100%;height:300px;" id="FAIscript">{$FAIscript}</textarea>
+ <textarea name="FAIscript" style="width:100%;height:300px;" id="FAIscript" >{$FAIscript}</textarea>
</td>
</tr>
</table>
<br>
<div>
- <input type="file" name="ImportFile">
- <input type="submit" name="ImportUpload" value="{t}Import script{/t}">
+ <input type="file" name="ImportFile" {$FAIscriptACL}>
+ <input type="submit" name="ImportUpload" value="{t}Import script{/t}" {$FAIscriptACL}>
{$DownMe}
</div>
<p class="seperator"> </p>
<br>
<div style="align:right;" align="right">
- <input type="submit" value="{t}Apply{/t}" name="SaveSubObject">
+ <input type="submit" value="{t}Apply{/t}" name="SaveSubObject" {$cnACL}>
<input type="submit" value="{t}Cancel{/t}" name="CancelSubObject">
</div>
<!-- Place cursor -->
index c65598798e85f64a22ec3ac76ac3252b79184570..a4d4371bdadaf9aef4ea1478e16bcfef9c85e91f 100644 (file)
</LABEL>
</td>
<td>
- <input value="{$description}" size="45" {$description} name="description" id="description">
+ <input value="{$description}" size="45" {$descriptionACL} name="description" id="description">
</td>
</tr>
</table>
{html_options options=$usedPackages}
</select>
<br>
- <input type="submit" name="Addpkg" value="{t}Add{/t}" {$OptionsACL}>
- <input type="submit" name="Delpkg" value="{t}Remove{/t}" {$OptionsACL}>
+ <input type="submit" name="Addpkg" value="{t}Add{/t}" {$OptionsACL} {$cnACL}>
+ <input type="submit" name="Delpkg" value="{t}Remove{/t}" {$OptionsACL} {$cnACL}>
<input type="submit" name="Conpkg" value="{t}Configure{/t}" {$OptionsACL} >
</td>
</tr>
index feb0f443f1cb68890848c93bfe439190a10af03a..43db0eb5676fac4bfe8dace8b8a2ca8a73f941d7 100644 (file)
</LABEL>
</td>
<td>
- <input value="{$description}" size="45" maxlength="80" name="description" id="description">
+ <input value="{$description}" size="45" maxlength="80" name="description" id="description" {$descriptionACL}>
</td>
</tr>
</table>
<select name="disks[]" title="{t}Choose a disk to delete or edit{/t}" style="width:100%" size="20" id="SubObject" multiple>
{html_options values=$diskKeys output=$disks}
</select><br>
- <input type="submit" name="AddDisk" value="{t}Add{/t}" title="{t}Add{/t}">
- <input type="submit" name="EditDisk" value="{t}Edit{/t}" title="{t}Edit{/t}">
- <input type="submit" name="DelDisk" value="{t}Delete{/t}" title="{t}Delete{/t}">
+ <input type="submit" name="AddDisk" value="{t}Add{/t}" title="{t}Add{/t}" {$cnACL}>
+ <input type="submit" name="EditDisk" value="{t}Edit{/t}" title="{t}Edit{/t}" >
+ <input type="submit" name="DelDisk" value="{t}Delete{/t}" title="{t}Delete{/t}" {$cnACL}>
</td>
</tr>
</table>
diff --git a/plugins/admin/fai/faiPartitionTableEntry.tpl b/plugins/admin/fai/faiPartitionTableEntry.tpl
index df23a2ff664fbe3eb0a2788da8481e080e4bc828..9ceab9439d3dcbcabd3826fe226f68c2eedd3838 100644 (file)
<td style='width:50%;border-right:1px solid #909090;'><LABEL for="DISK_cn">
{t}Name{/t}
</LABEL>{$must}
- <input value="{$DISK_cn}" size="45" maxlength="80" name="DISK_cn" id="DISK_cn">
+ <input value="{$DISK_cn}" size="45" maxlength="80" name="DISK_cn" id="DISK_cn" {$cnACL}>
</td>
<td><LABEL for="DISK_description">
{t}Description{/t}
</LABEL>
- <input value="{$DISK_description}" size="45" maxlength="80" name="DISK_description" id="DISK_description">
+ <input value="{$DISK_description}" size="45" maxlength="80" name="DISK_description" id="DISK_description" {$descriptionACL}>
</td>
</tr>
</table>
<h2><img class="center" alt="" src="images/editpaste.png" align="middle" title="{t}Partition entries{/t}"> {t}Partition entries{/t}</h2>
{$setup}
<br>
-<input type="submit" name="AddPartition" value="{t}Add partition{/t}" >
+<input type="submit" name="AddPartition" value="{t}Add partition{/t}" {$cnACL}>
<br>
<br>
<p class="seperator"> </p>
<br>
<div style="align:right;" align="right">
-<input type="submit" name="SaveDisk" value="{t}Save{/t}" >
+<input type="submit" name="SaveDisk" value="{t}Save{/t}" {$cnACL}>
<input type="submit" name="CancelDisk" value="{t}Cancel{/t}" >
</div>
<!-- Place cursor -->
index 8ecedab7f75da5355f6caea1dd78e54619c99560..5020bc74557770a214669c7679e830ecc14fd53b 100644 (file)
</LABEL>
</td>
<td>
- <input value="{$cn}" size="45" maxlength="80" id="cn" name="cn">
+ <input value="{$cn}" size="45" maxlength="80" id="cn" name="cn" {$cnACL}>
</td>
</tr>
<tr>
</LABEL>
</td>
<td>
- <input value="{$description}" size="45" maxlength="80" name="description" id="description">
+ <input value="{$description}" size="45" maxlength="80" name="description" id="description" {$descriptionACL}>
</td>
</tr>
</table>
</select>-->
{$divlist}
<br>
- <input type="submit" name="AddClass" value="{t}Add{/t}">
+ <input type="submit" name="AddClass" value="{t}Add{/t}" {$cnACL}>
<input type="hidden" name="edit_helper">
</td>
</tr>
index 1a646b3d91e3de92a4a1598ad4057572a7806af3..4c235c3613643fbcbbe0c2abeca4f91532f6762b 100644 (file)
</LABEL>
</td>
<td>
- <input size="45" maxlength="80" value="{$description}" {$description} name="description" id="description">
+ <input size="45" maxlength="80" value="{$description}" {$description} name="description" id="description" {$descriptionACL}>
</td>
</tr>
</table>
<input type="submit" name="EditSubObject" value="{t}Edit{/t}" title="{t}Edit{/t}">
<input type="submit" name="DelSubObject" value="{t}Delete{/t}" title="{t}Delete{/t}">
-->
- <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}">
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}" {$cnACL}>
</td>
</tr>
</table>
</td>
</tr>
</table>
-<input type="hidden" value="1" name="FAIscript_posted">
+<input type="hidden" value="1" name="FAIscript_posted" >
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
index cc1eee23c77314c8e872ec9295e3792e4a40968f..9f60e8a17eba42fd1d5d275da1254d7489d949a9 100644 (file)
{t}Name{/t}{$must}
</td>
<td>
- <input value="{$cn}" size="45" maxlength="80" name="cn">
+ <input value="{$cn}" size="45" maxlength="80" name="cn" {$cnACL}>
</td>
</tr>
<tr>
{t}Description{/t}
</td>
<td>
- <input size="45" maxlength="80" value="{$description}" name="description">
+ <input size="45" maxlength="80" value="{$description}" name="description" {$descriptionACL}>
</td>
</tr>
</table>
</LABEL>
</td>
<td>
- <select name="FAIpriority" title="{t}Choose a priority{/t}">
+ <select name="FAIpriority" title="{t}Choose a priority{/t}" {$FAIpriorityACL}>
{html_options values=$FAIprioritys output=$FAIprioritys selected=$FAIpriority}
</select>
</td>
<table summary="" width="99%">
<tr>
<td>
- <textarea name="FAIscript" style="width:100%;height:300px;" id="FAIscript">{$FAIscript}</textarea>
+ <textarea name="FAIscript" style="width:100%;height:300px;" id="FAIscript" >{$FAIscript}</textarea>
</td>
</tr>
</table>
<br>
<div>
- <input type="file" name="ImportFile">
- <input type="submit" name="ImportUpload" value="{t}Import script{/t}">
+ <input type="file" name="ImportFile" {$FAIscriptACL}>
+ <input type="submit" name="ImportUpload" value="{t}Import script{/t}" {$FAIscriptACL}>
{$DownMe}
</div>
<br>
<div style="align:right;" align="right">
- <input type="submit" value="{t}Apply{/t}" name="SaveSubObject">
+ <input type="submit" value="{t}Apply{/t}" name="SaveSubObject" {$cnACL}>
<input type="submit" value="{t}Cancel{/t}" name="CancelSubObject">
</div>
<!-- Place cursor -->
index e97b520698d117af89436e9f10052adc1bde8b4a..9e380d77a68d385cc8713f79cd3a23736474fc73 100644 (file)
</LABEL>
</td>
<td>
- <input value="{$description}" size="45" maxlength="80" {$description} name="description" id="description">
+ <input value="{$description}" size="45" maxlength="80" {$description} name="description" id="description" {$descriptionACL}>
</td>
</tr>
</table>
<table summary="" width="100%">
<tr>
<td>
- <select name="SubObject[]" multiple title="{t}Choose a template to delete or edit{/t}" style="width:100%;" size="20" id="SubObject">
+ <select name="SubObject[]" multiple}
+ title="{t}Choose a template to delete or edit{/t}" style="width:100%;" size="20" id="SubObject">
{html_options values=$SubObjectKeys output=$SubObjects}
</select><br>
- <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}">
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}" {$cnACL}>
<input type="submit" name="EditSubObject" value="{t}Edit{/t}" title="{t}Edit{/t}">
- <input type="submit" name="DelSubObject" value="{t}Delete{/t}" title="{t}Delete{/t}">
+ <input type="submit" name="DelSubObject" value="{t}Delete{/t}" title="{t}Delete{/t}" {$cnACL}>
</td>
</tr>
</table>
index 2c2e1e139d418a57270c59566559c0ab5d933b5a..1aa04a261967ff83e618c9df86bf1d3cbd4cd848 100644 (file)
<tr>
<td width="50%">
{t}Name{/t}{$must}
- <input value="{$cn}" name="cn" size="45" maxlength="80">
+ <input value="{$cn}" name="cn" size="45" maxlength="80" {$cnACL}>
</td>
<td>
{t}Description{/t}
- <input size="45" maxlength="80" value="{$description}" name="description">
+ <input size="45" maxlength="80" value="{$description}" name="description" {$descriptionACL}>
</td>
</tr>
</table>
{/if}
<br>
<br>
- <input type="file" name="FAItemplateFile" value="{$FAItemplateFile}" id="FAItemplateFile">
- <input type="submit" value="{t}Upload{/t}" name="TmpFileUpload">
+ <input type="file" name="FAItemplateFile" value="{$FAItemplateFile}" id="FAItemplateFile" {$FAItemplateFileACL}>
+ <input type="submit" value="{t}Upload{/t}" name="TmpFileUpload" {$FAItemplateFileACL}>
<br>
<br>
</td>
</LABEL>
</td>
<td>
- <input type="text" name="FAItemplatePath" value="{$FAItemplatePath}" id="FAItemplatePath" size="45">
+ <input type="text" name="FAItemplatePath" value="{$FAItemplatePath}" id="FAItemplatePath" size="45" {$FAItemplatePathACL}>
</td>
</tr>
</table>
</LABEL>
</td>
<td>
- <input type="text" name="user" value="{$user}" id="user" size="15">
+ <input type="text" name="user" value="{$user}" id="user" size="15" {$userACL}>
</td>
</tr><tr>
<td style="vertical-align:top">
</LABEL>
</td>
<td>
- <input type="text" name="group" value="{$group}" id="group" size="15">
+ <input type="text" name="group" value="{$group}" id="group" size="15" {$groupACL}>
<br>
<br>
</td>
<th> </th>
</tr>
<tr><td>{t}User{/t}</td>
- <td align="center"><input type="checkbox" name="u4" value="4" {$u4}></td>
- <td align="center"><input type="checkbox" name="u2" value="2" {$u2}></td>
- <td align="center"><input type="checkbox" name="u1" value="1" {$u1}></td>
+ <td align="center"><input type="checkbox" name="u4" value="4" {$u4} {$userACL}></td>
+ <td align="center"><input type="checkbox" name="u2" value="2" {$u2} {$userACL}></td>
+ <td align="center"><input type="checkbox" name="u1" value="1" {$u1} {$userACL}></td>
<td> </td>
- <td align="center"><input type="checkbox" name="s4" value="4" {$s4}></td>
+ <td align="center"><input type="checkbox" name="s4" value="4" {$s4} {$userACL}></td>
<td>({t}SUID{/t})</td>
</tr>
<tr><td>{t}Group{/t}</td>
- <td align="center"><input type="checkbox" name="g4" value="4" {$g4}></td>
- <td align="center"><input type="checkbox" name="g2" value="2" {$g2}></td>
- <td align="center"><input type="checkbox" name="g1" value="1" {$g1}></td>
+ <td align="center"><input type="checkbox" name="g4" value="4" {$g4} {$userACL}></td>
+ <td align="center"><input type="checkbox" name="g2" value="2" {$g2} {$userACL}></td>
+ <td align="center"><input type="checkbox" name="g1" value="1" {$g1} {$userACL}></td>
<td> </td>
- <td align="center"><input type="checkbox" name="s2" value="2" {$s2}></td>
+ <td align="center"><input type="checkbox" name="s2" value="2" {$s2} {$userACL}></td>
<td>({t}SGID{/t})</td>
</tr>
<tr><td>{t}Others{/t}</td>
- <td align="center"><input type="checkbox" name="o4" value="4" {$o4}></td>
- <td align="center"><input type="checkbox" name="o2" value="2" {$o2}></td>
- <td align="center"><input type="checkbox" name="o1" value="1" {$o1}></td>
+ <td align="center"><input type="checkbox" name="o4" value="4" {$o4} {$userACL}></td>
+ <td align="center"><input type="checkbox" name="o2" value="2" {$o2} {$userACL}></td>
+ <td align="center"><input type="checkbox" name="o1" value="1" {$o1} {$userACL}></td>
<td> </td>
- <td align="center"><input type="checkbox" name="s1" value="1" {$s1}></td>
+ <td align="center"><input type="checkbox" name="s1" value="1" {$s1} {$userACL}></td>
<td>({t}sticky{/t})</td>
</tr></table>
index d7ef90216c24d01044a2b06a9d1794ac17d9c29a..6d07486a4d2a73c4e1c49647e3aac134282b3e71 100644 (file)
</LABEL>
</td>
<td>
- <input size="45" maxlength="80" value="{$description}" name="description" id="description">
+ <input size="45" maxlength="80" value="{$description}" name="description" id="description" {$descriptionACL}>
</td>
</tr>
</table>
<table summary="" width="100%">
<tr>
<td>
- <select name="SubObject[]" multiple title="{t}Choose a variable to delete or edit{/t}" style="width:100%;" size="20" id="SubObject">
+ <select name="SubObject[]" multiple title="{t}Choose a variable to delete or edit{/t}"
+ style="width:100%;" size="20" id="SubObject">
{html_options values=$SubObjectKeys output=$SubObjects}
</select><br>
- <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}">
- <input type="submit" name="EditSubObject" value="{t}Edit{/t}" title="{t}Edit{/t}">
- <input type="submit" name="DelSubObject" value="{t}Delete{/t}" title="{t}Delete{/t}">
+ <input type="submit" name="AddSubObject" value="{t}Add{/t}" title="{t}Add{/t}" {$cnACL}>
+ <input type="submit" name="EditSubObject" value="{t}Edit{/t}" title="{t}Edit{/t}" >
+ <input type="submit" name="DelSubObject" value="{t}Delete{/t}" title="{t}Delete{/t}" {$cnACL}>
</td>
</tr>
</table>
index 9c7d7e60aaaf4106bbada7f33678f914e725d3cd..c4d6fc63817fba1265e509bdeffba744b8c76895 100644 (file)
{t}Name{/t}{$must}
</td>
<td>
- <input value="{$cn}" size="45" maxlength="80" name="cn">
+ <input value="{$cn}" size="45" maxlength="80" name="cn" {$cnACL}>
</td>
</tr>
<tr>
{t}Description{/t}
</td>
<td>
- <input value="{$description}" size="45" maxlength="80" name="description">
+ <input value="{$description}" size="45" maxlength="80" name="description" {$descriptionACL}>
</td>
</tr>
</table>
</LABEL>
</td>
<td>
- <input type="text" name="FAIvariableContent" value="{$FAIvariableContent}" id="Content" style="width:250px;">
+ <input type="text" name="FAIvariableContent" value="{$FAIvariableContent}" id="Content" style="width:250px;" {$FAIvariableContentACL}>
</td>
</tr>
</table>
<p class="seperator"> </p>
<br>
<div style="align:right;" align="right">
- <input type="submit" value="{t}Apply{/t}" name="SaveSubObject">
+ <input type="submit" value="{t}Apply{/t}" name="SaveSubObject" {$cnACL}>
<input type="submit" value="{t}Cancel{/t}" name="CancelSubObject">
</div>