[admin/mail_invalide,gestion/] Modification du systeme de mail_invalide
Maintenant tout est gere par des blacklistes mail_invalide, ce qui est beaucoup plus simple ... (Le champ mailInvalide de la base LDAP peut maintenant etre supprime ...) darcs-hash:20100318014002-ddb99-d7e616f0b5040fba54c55d49fcaad25dc55a5665.gz
This commit is contained in:
parent
9e78235eff
commit
b1239e1291
5 changed files with 42 additions and 75 deletions
|
@ -199,26 +199,6 @@ class mail_ajout_droits:
|
|||
traceback.print_exc()
|
||||
|
||||
|
||||
class mail_invalide_expire:
|
||||
# Passage d'un mail en invalide 2 semaines après notification
|
||||
debug = True
|
||||
|
||||
def __init__(self, args):
|
||||
self.args = args
|
||||
|
||||
def reconfigure(self):
|
||||
cprint(u'Passage en mail invalide', 'gras')
|
||||
db = crans_ldap()
|
||||
for arg in self.args:
|
||||
aid, old_mail = arg.split('$')
|
||||
adhl = db.search("aid=%s" % aid, 'w')['adherent']
|
||||
if len(adhl) > 0:
|
||||
adh = adhl[0]
|
||||
if adh.mail() == old_mail:
|
||||
adh.mail_invalide(True)
|
||||
adh.save()
|
||||
|
||||
|
||||
class ML_ens:
|
||||
debug = True
|
||||
|
||||
|
@ -242,22 +222,3 @@ class ML_ens:
|
|||
print OK
|
||||
mlist.Save()
|
||||
mlist.Unlock()
|
||||
|
||||
class mail_valide:
|
||||
debug = True
|
||||
|
||||
def __init__(self,aids):
|
||||
self.aids = aids
|
||||
|
||||
def reconfigure(self):
|
||||
db = crans_ldap()
|
||||
cprint(u'Validation d\'adresses', 'gras')
|
||||
for aid in self.aids:
|
||||
adh = db.search(("aid=%s" %aid), 'w')['adherent'][0]
|
||||
if not adh._modifiable:
|
||||
db.services_to_restart('mail_valide',aid)
|
||||
print "echec pour le mail de %s" %adh.nom()
|
||||
else:
|
||||
adh.mail_invalide(False)
|
||||
adh.save()
|
||||
print "mail de %s marque valide" % adh.nom()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue