Code

fixed getkiosk.php to support new acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Oct 2007 12:24:34 +0000 (12:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Oct 2007 12:24:34 +0000 (12:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7456 594d385d-05f5-0310-b6e9-bd551577e9d8

html/getkiosk.php

index ef0c64aa81e59061b436c56f355c012a2b0ce224..1b383e753632037e4ab817709ce8e94adef7aa04 100644 (file)
@@ -64,12 +64,20 @@ $config= $_SESSION['config'];
 /* Check ACL's */
 #FIXME Use more specific acl categories instead of all/all
 $ui = get_userinfo();
-$acl = $ui->get_permissions(base64_decode($_GET['id']),"all/all");
-if(!preg_match("/r/",$acl)){
+
+$tmp = $ui->get_module_departments("server/goKioskService");
+$found = FALSE;
+foreach($tmp as $dir){
+  if(preg_match("/r/",$ui->get_permissions($dir,"server/goKioskService"))){
+    $found = TRUE;
+    break;
+  }
+}
+if(!$found){
   header ("Location: index.php");
   exit;
 }
-$dir= $config->search('environment', 'kioskpath', array('main','tabs'));
+$dir= $config->search('environment', 'kioskpath', array('tabs','menu'));
 getkiosk($dir."/".$_GET['id']);
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: