From: hickert Date: Fri, 12 Sep 2008 13:09:39 +0000 (+0000) Subject: Updated kiosk profile management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4ba1c2a01b2dd19a8fae2bcd3261a68fca880a98;p=gosa.git Updated kiosk profile management -Added ACLs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12454 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc b/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc index 07baffc6e..dc27c5333 100644 --- a/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc +++ b/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc @@ -84,12 +84,14 @@ class goKioskService extends goService{ /* Fill templating stuff */ $smarty= get_smarty(); $smarty->assign("baseDir",$this->baseDir); + $smarty->assign("ThisACL",$this->getacl("")); $display= ""; /* Download kiosk profile */ if(isset($_GET['getkiosk'])){ $id = $_GET['getkiosk']; + foreach($this->gotoKioskProfiles as $profile){ if($profile['name'] == $id){ $name = $this->baseDir."/".$id; @@ -105,7 +107,7 @@ class goKioskService extends goService{ /* Add new kiosk profile * in profile directory ($this->baseDir); */ - if((isset($_POST['profileAdd']))&&(isset($_FILES['newProfile']))){ + if((isset($_POST['profileAdd']))&&(isset($_FILES['newProfile'])) && $this->acl_is_writeable("")){ $file = $_FILES['newProfile']; if(!file_exists($this->baseDir.$file['name'])){ $tmp = array( @@ -122,7 +124,7 @@ class goKioskService extends goService{ $only_once = true; foreach($_POST as $name => $value){ - if((preg_match("/^delkiosk_/",$name))&&($only_once)){ + if((preg_match("/^delkiosk_/",$name))&&($only_once) && $this->acl_is_writeable("")){ /* Get id, name and path */ $only_once = false; @@ -171,11 +173,17 @@ class goKioskService extends goService{ /* Display list of profiles */ $divlist = new divSelectBox("KioskProfiles"); $divlist -> SetHeight (300); + + foreach($this->gotoKioskProfiles as $key => $val ){ + $del = " "; + if($this->acl_is_writeable("")){ + $del = ""; + } $divlist->AddEntry(array( array("string"=>"".$val['name'].""), - array("string"=>"" , + array("string"=>$del, "attach"=>" style='border-right: 0px;width:24px; text-align:center;' ") )); } diff --git a/gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl b/gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl index e43973262..7d9f0ca54 100644 --- a/gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl +++ b/gosa-plugins/goto/admin/systems/services/kiosk/goKioskService.tpl @@ -16,9 +16,15 @@ {t}Server path{/t} 

+{render acl=$ThisACL} {$divlist} +{/render} +{render acl=$ThisACL} +{/render} +{render acl=$ThisACL} +{/render}