From 76bc68435f35c56de438b9a3b00a75490e5a422e Mon Sep 17 00:00:00 2001 From: bernat Date: Mon, 28 Feb 2005 14:58:13 +0100 Subject: [PATCH] Les personnels ENS n'ont accs qu'au wifi darcs-hash:20050228135813-d1718-331e84e3d3518adfeb972e57329dee7d49e2e0d2.gz --- gestion/gest_crans.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index db77e14b..2273b27e 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -1681,13 +1681,21 @@ def menu_principal() : if choix=='aMc' : # Ajout d'une machine à l'adhérent courant - arg = u'--title "Nouvelle machine" ' - arg+= u'--menu "Type de machine ?" 0 0 0 ' - arg+= u'"Fixe" "Machine fixe" ' - arg+= u'"Wifi" "Machine wireless" ' - annul , result = dialog(arg) - if annul : continue - choix=result[0] + if proprio.etudes(0) != "ENS" or proprio.etudes(1) != "8": + arg = u'--title "Nouvelle machine" ' + arg+= u'--menu "Type de machine ?" 0 0 0 ' + arg+= u'"Fixe" "Machine fixe" ' + arg+= u'"Wifi" "Machine wireless" ' + annul , result = dialog(arg) + if annul : continue + choix=result[0] + else: + # Pour les personnels ENS, wifi uniquement + arg = u'--title "Nouvelle machine" ' + arg+= u'--msgbox "Personnel ENS\n\n' + \ + u'Un personnel ENS ne peut accéder qu\'au wifi.\n\n\n" 0 0' + dialog(arg) + choix = 'Wifi' try : if choix=='Fixe' : becane = machine(proprio,'fixe')