From 708129aa2dae8fd281b1aaf25ef7c8882011be69 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Fri, 15 May 2009 12:53:29 +0200 Subject: [PATCH] [intranet/impression] nouvelle imprimanet non accessible Ignore-this: 11669113a1a987dd8aef135773cf88cd darcs-hash:20090515105329-bd074-fa61dd4267c56f2bd719f1a4d15f00daf24c7fb5.gz --- intranet/modules/impression/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intranet/modules/impression/main.py b/intranet/modules/impression/main.py index a4cbc0fd..1d474fc3 100644 --- a/intranet/modules/impression/main.py +++ b/intranet/modules/impression/main.py @@ -92,6 +92,10 @@ class main(ModuleBase): except Exception, e: data['Erreur_imprimante'] = str(e).replace("\"", "\\\"") data['errorMsg'] = u"Imprimante injoignable" + adh = cherrypy.session['LDAP'].getProprio(cherrypy.session['uid']) + if not "Bureau" in adh.droits(): + data['Erreur_imprimante'] = u"Imprimante non encore mise à disposition" + data['errorMsg'] = u"La nouvelle imprimante est encore en cours d'installation" if not cherrypy.config.get('crans.activate', True): data['Erreur_imprimante'] = "Config impression" data['errorMsg'] = cherrypy.config.get('crans.activate.errorMsg', u"Imprimante HS")