diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index fe978fbf..5b541489 100644 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -1412,7 +1412,8 @@ def set_machine(machine): try: machine.mac(result[1]) except ValueError, c: - if len(c.args)>1 and c.args[1] == 1 and isadm: + if len(c.args)>1 and c.args[1] == 1 \ + and (isadm or machine.proprietaire().chbre()[0] == 'G'): # Mac en double arg = u'--title "Adresse MAC" ' arg += u'--yesno "L\'adresse MAC existe déja, continuer ? \n" 0 0' @@ -2084,6 +2085,7 @@ def menu_principal(): # déjà une machine fixe, sauf si on est membre actif # (expérimental) + machines_fixes = proprio.machines_fixes() if not isinstance(proprio, Club) and not proprio.adherentPayant(): # Les gens qui ne paient pas n'ont le droit qu'à une # seule machine fixe @@ -2092,7 +2094,11 @@ def menu_principal(): continue else: choix = "Fixe" - elif isinstance(proprio, Club) or not proprio.machines_fixes() or proprio.droits() or proprio.etudes(0) == 'Personnel ENS': + elif isinstance(proprio, Club) \ + or not machines_fixes \ + or proprio.droits() \ + or proprio.etudes(0) == 'Personnel ENS' \ + or (proprio.chbre()[0] == 'G' and len(machines_fixes) < 2): arg = u'--title "Nouvelle machine" ' arg += u'--menu "Type de machine ?" 0 0 0 ' arg += u'"Fixe" "Machine fixe" '