Passage aux adhésions glissantes (partie I, sans lc_ldap)
This commit is contained in:
parent
169b7000b8
commit
49cef4c095
12 changed files with 485 additions and 231 deletions
|
@ -26,14 +26,10 @@ def chap_ok(password, challenge, clear_pass) :
|
|||
return False
|
||||
|
||||
def paiement_ok(adh):
|
||||
"""Paiment ok ?"""
|
||||
global ann_scol
|
||||
paid = max(adh.paiement() + [0])
|
||||
if periode_transitoire:
|
||||
# Si periode transitoire, on accepte les personnes n'ayant pas
|
||||
# réadhéré
|
||||
ann_scol -= 1
|
||||
return ann_scol <= paid
|
||||
"""Vérifie que le paiement est ok
|
||||
|
||||
"""
|
||||
return adh.paiement_ok()
|
||||
|
||||
def do_auth(mac, prise):
|
||||
"""Effectue l'authentification. Renvoie (success, msg,
|
||||
|
@ -66,14 +62,14 @@ def do_auth(mac, prise):
|
|||
if 'bloq' in m[0].blacklist_actif():
|
||||
return (-1, "Bloquage total des services pour cette machine", "")
|
||||
|
||||
# les gens qui doivent être isolés
|
||||
# les gens qui doivent être isolés
|
||||
if ('virus' in m[0].blacklist_actif() or 'ipv6_ra' in m[0].blacklist_actif()
|
||||
or 'autodisc_virus' in m[0].blacklist_actif()):
|
||||
return (0, "Bad boy", "isolement")
|
||||
|
||||
if ('carte_etudiant' in m[0].blacklist_actif()):
|
||||
return (0, "Manque carte etudiant", "accueil")
|
||||
|
||||
|
||||
# Paiement proprio ?
|
||||
if not paiement_ok(proprio):
|
||||
return (0, "N'a pas payé", "accueil")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue