fix: Correction de l'affichage du message d'erreur lors de l'authentification.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,7 +27,7 @@ SECRET_KEY = config("SECRET_KEY")
|
||||
DEBUG = config("DEBUG", default=True, cast=bool)
|
||||
|
||||
ALLOWED_HOSTS = config("ALLOWED_HOSTS", default=[]).split(",")
|
||||
CSRF_TRUSTED_ORIGINS = config("CSRF_TRUSTED_ORIGINS", default=[]).split(",")
|
||||
#CSRF_TRUSTED_ORIGINS = config("CSRF_TRUSTED_ORIGINS", default=[]).split(",")
|
||||
|
||||
LOGIN_URL = 'login/'
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
from simple_sso.sso_server.server import Server
|
||||
|
||||
from authentification.models import Employe
|
||||
|
||||
|
||||
class CerfigSSOServer(Server):
|
||||
def get_user_data(self, user, consumer, extra_data=None):
|
||||
user_data = super().get_user_data(user, consumer, extra_data)
|
||||
employe = Employe.objects.get(user=user)
|
||||
|
||||
user_data.update({
|
||||
'departement': employe.departement.nom,
|
||||
'departement': employe.departement.nom if employe.departement else "",
|
||||
'chef_departement': employe.chef,
|
||||
'groups': [group.name for group in user.groups.all()],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user