Skip to content
Snippets Groups Projects
Commit b6cf916e authored by Reinder Kraaij's avatar Reinder Kraaij :eye:
Browse files

Merge branch 'TMSS-2876' into 'master'

TMSS-2876: do not update details on existing users so that this does not prevent login

See merge request !1260
parents 31192942 d5179896
No related branches found
No related tags found
1 merge request!1260TMSS-2876: do not update details on existing users so that this does not prevent login
......@@ -80,14 +80,12 @@ class TMSSOIDCAuthenticationBackend(OIDCAuthenticationBackend):
logger.info('update user=%s claims=%s' % (user, claims))
if not Token.objects.filter(user=user).first():
Token.objects.create(user=user) # required for websockets
try:
self._set_user_details_from_claims(user, claims)
except Exception as e:
logger.warning("Could not update user details from claims (%s)" % e)
# todo: apparently we can have the situation where an existing user account has the same username and there
# (understandably) is a unique constraint on that field. So we cannot freely update these details.
# Check why a Keycloak login does not match the existing entry and how we can best deal with that.
# -> TMSS-2876
self._set_user_project_roles_from_claims(user, claims)
self._set_user_system_roles_from_claims(user, claims)
# todo: apparently we can have the situation where an existing user account has the same username and there
# (understandably) is a unique constraint on that field. So we cannot freely update these details.
# Check why a Keycloak login does not match the existing entry and how we can best deal with that.
# -> TMSS-2876
# self._set_user_details_from_claims(user, claims)
return user
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment