[lc_ldap,attributs] nettoyage bl & set_ldapattr
This commit is contained in:
parent
222a2a9a4d
commit
adfa070db5
2 changed files with 29 additions and 201 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue