[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')
|
sys.path.append('/usr/scripts/gestion')
|
||||||
from ldap_crans import crans_ldap, AssociationCrans, Club
|
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
|
from iptools import AddrInNet
|
||||||
def chap_ok(password, challenge, clear_pass) :
|
def chap_ok(password, challenge, clear_pass) :
|
||||||
""" Test l'authentification chap fournie
|
""" Test l'authentification chap fournie
|
||||||
|
@ -66,11 +66,9 @@ def do_auth(mac):
|
||||||
|
|
||||||
# Paiment ok ?
|
# Paiment ok ?
|
||||||
paid = max(proprio.paiement() + [0])
|
paid = max(proprio.paiement() + [0])
|
||||||
if dat[1] in (8, 9):
|
if periode_transitoire:
|
||||||
# En septembre les anciennes adhésions sont OK
|
# Si periode transitoire, on accepte les personnes n'ayant pas
|
||||||
ann_scol -= 1
|
# réadhéré
|
||||||
elif dat[1] == 10 and dat[2] in (1,2,3):
|
|
||||||
# On laisse 3 jours ou les gens ont une page sur squid
|
|
||||||
ann_scol -= 1
|
ann_scol -= 1
|
||||||
if ann_scol > paid:
|
if ann_scol > paid:
|
||||||
return (0, "N'a pas payé", "accueil")
|
return (0, "N'a pas payé", "accueil")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue