From: cajus Date: Wed, 9 Nov 2005 15:44:27 +0000 (+0000) Subject: Updates for kiosk/ppd handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=019f80379f295d5617ee0234c835585c10166cb4;p=gosa.git Updates for kiosk/ppd handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1894 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index 776ad462b..c30e45fd3 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,8 @@ Things to fix before 2.4: * Rework dialog to add aplications (group dialog) +* Make gotoKioskPath stored like the ppd files (i.e. http://vserver-01/kiosk/whatever.tar.gz) + Target for 2.5: =============== diff --git a/html/download.php b/html/download.php new file mode 100644 index 000000000..557721cca --- /dev/null +++ b/html/download.php @@ -0,0 +1,89 @@ +search('(&(objectClass=gotoPrinter)(cn='.$cn.')(gotoPrinterPPD=*))'); + if ($ldap->count() != 1){ + echo "Bad request"; + exit; + } + + /* Get result */ + $res= $ldap->fetch(); + $path= "/var/spool/".preg_replace('/^[^:]+:\/\/[^\/]+\//', '', $res['gotoPrinterPPD'][0]); + header("Content-type: text/plain"); + echo file_get_contents($path); + break; + + case "kiosk": + /* Perform LDAP query */ + $ldap= new LDAP ("", "", "ldap://se1--002:389"); + $ldap->search('(&(objectClass=gotoEnvironment)(|(uid='.$cn.')(cn='.$cn.'))(gotoKioskProfile=*))'); + if ($ldap->count() != 1){ + echo "Bad request"; + exit; + } + + # Normally we would do this: + # Load groups we're member in + # Look for kiosk settings in these groups, take the first that matches + # Look for kiosk settings for the user + + /* Get result */ + $res= $ldap->fetch(); + $path= "/etc/goto/kiosk/".$res['gotoKioskProfile'][0]; + header("Content-type: octet-stream"); + echo file_get_contents($path); + break; + + default: + echo "Bad request"; + exit; +} + +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?>