Possibilite de creer les users en staff
[auf_references_client.git] / auf_references_client / backends.py
index 48eb276..0623df2 100644 (file)
@@ -39,7 +39,7 @@ class CascadeBackend(ModelBackend):
                         email = email, 
                         first_name = remoteUser.prenom,
                         last_name = remoteUser.nom,
-                        is_staff = False,
+                        is_staff = settings.USERS_AS_STAFF,
                         is_active = True,
                         is_superuser = False)
                 localUser.set_password (password)
@@ -51,7 +51,7 @@ class CascadeBackend(ModelBackend):
             if not localUser:
                 localUser = DjangoUser (username = username,
                         email = email, 
-                        is_staff = False,
+                        is_staff = settings.USERS_AS_STAFF,
                         is_active = True,
                         is_superuser = False)
             # Cas du compte local seul, on verifie le mot de passe