[radius_auth] stop hardcoding
Ignore-this: eb7b310fa8e8113a0e7c70e6d629610f darcs-hash:20121002002852-28565-5df5528158dec661ee3d76cbafadb7bef7c6d055.gz
This commit is contained in:
parent
c9ff1c9847
commit
03aa8b4f5b
1 changed files with 4 additions and 6 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue