[lc_ldap,attributs] nettoyage bl & set_ldapattr

This commit is contained in:
Antoine Durand-Gasselin 2010-11-11 17:49:07 +01:00
parent 222a2a9a4d
commit adfa070db5
2 changed files with 29 additions and 201 deletions

View file

@ -431,6 +431,13 @@ class blacklist(Attr):
'comm' : bl_comm,
'actif' : int(bl_debut) < now and (bl_fin == '-' or int(bl_fin) > now) }
def is_actif(self):
return self.value['actif']
def terminer(self):
self.value.fin = max(self.value.debut, time.time() - 60)
self.actif = False
def __unicode__(self):
return u'%(debut)s$%(fin)s$%(type)s$%(comm)s' % self.value