8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 16:33:47 +00:00

Cohérence

This commit is contained in:
Gabriel Detraz 2016-10-18 17:11:45 +02:00
parent 2357cc056b
commit 9a500fa649

View file

@ -102,12 +102,12 @@ class UserManager(BaseUserManager):
class User(AbstractBaseUser): class User(AbstractBaseUser):
STATE_ACTIVE = 0 STATE_ACTIVE = 0
STATE_DEACTIVATED = 1 STATE_DISABLED = 1
STATE_ARCHIVED = 2 STATE_ARCHIVE = 2
STATES = ( STATES = (
(0, 'STATE_ACTIVE'), (0, 'STATE_ACTIVE'),
(1, 'STATE_DEACTIVATED'), (1, 'STATE_DISABLED'),
(2, 'STATE_ARCHIVED'), (2, 'STATE_ARCHIVE'),
) )
def auto_uid(): def auto_uid():
@ -276,15 +276,15 @@ class User(AbstractBaseUser):
def __str__(self): def __str__(self):
return self.pseudo return self.pseudo
@receiver(post_save, sender=User) #@receiver(post_save, sender=User)
def user_post_save(sender, **kwargs): #def user_post_save(sender, **kwargs):
user = kwargs['instance'] # user = kwargs['instance']
user.ldap_sync(base=True, access_refresh=True, mac_refresh=False) #user.ldap_sync(base=True, access_refresh=True, mac_refresh=False)
@receiver(post_delete, sender=User) @receiver(post_delete, sender=User)
def user_post_delete(sender, **kwargs): def user_post_delete(sender, **kwargs):
user = kwargs['instance'] user = kwargs['instance']
user.ldap_del() #user.ldap_del()
class ServiceUser(AbstractBaseUser): class ServiceUser(AbstractBaseUser):