diff --git a/radius_auth.py b/radius_auth.py index 7554f4ea..66dabd23 100644 --- a/radius_auth.py +++ b/radius_auth.py @@ -6,7 +6,7 @@ from syslog import syslog, openlog sys.path.append('/usr/scripts/gestion') from ldap_crans import crans_ldap, AssociationCrans, Club -from config import ann_scol, dat, vlans +from config import ann_scol, dat, vlans, periode_transitoire from iptools import AddrInNet def chap_ok(password, challenge, clear_pass) : """ Test l'authentification chap fournie @@ -66,11 +66,9 @@ def do_auth(mac): # Paiment ok ? paid = max(proprio.paiement() + [0]) - if dat[1] in (8, 9): - # En septembre les anciennes adhésions sont OK - ann_scol -= 1 - elif dat[1] == 10 and dat[2] in (1,2,3): - # On laisse 3 jours ou les gens ont une page sur squid + if periode_transitoire: + # Si periode transitoire, on accepte les personnes n'ayant pas + # réadhéré ann_scol -= 1 if ann_scol > paid: return (0, "N'a pas payé", "accueil")