From 7b59cafba35d4caf395e53637ee45d1061828731 Mon Sep 17 00:00:00 2001 From: chirac Date: Tue, 18 Oct 2016 17:11:45 +0200 Subject: [PATCH] =?UTF-8?q?Coh=C3=A9rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/models.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/users/models.py b/users/models.py index 4ce3f1c8..d5952771 100644 --- a/users/models.py +++ b/users/models.py @@ -102,12 +102,12 @@ class UserManager(BaseUserManager): class User(AbstractBaseUser): STATE_ACTIVE = 0 - STATE_DEACTIVATED = 1 - STATE_ARCHIVED = 2 + STATE_DISABLED = 1 + STATE_ARCHIVE = 2 STATES = ( (0, 'STATE_ACTIVE'), - (1, 'STATE_DEACTIVATED'), - (2, 'STATE_ARCHIVED'), + (1, 'STATE_DISABLED'), + (2, 'STATE_ARCHIVE'), ) def auto_uid(): @@ -276,15 +276,15 @@ class User(AbstractBaseUser): def __str__(self): return self.pseudo -@receiver(post_save, sender=User) -def user_post_save(sender, **kwargs): - user = kwargs['instance'] - user.ldap_sync(base=True, access_refresh=True, mac_refresh=False) +#@receiver(post_save, sender=User) +#def user_post_save(sender, **kwargs): +# user = kwargs['instance'] + #user.ldap_sync(base=True, access_refresh=True, mac_refresh=False) @receiver(post_delete, sender=User) def user_post_delete(sender, **kwargs): user = kwargs['instance'] - user.ldap_del() + #user.ldap_del() class ServiceUser(AbstractBaseUser):