Skip to content
Snippets Groups Projects
Verified Commit 1958c76a authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[OIDC] Expose avatar instead of photo in profile

parent 5aea5fe2
No related branches found
No related tags found
1 merge request!1088Resolve "[OIDC] "profile" scope should use avatar instead of photo"
Pipeline #87669 passed
...@@ -19,6 +19,7 @@ Changed ...@@ -19,6 +19,7 @@ Changed
~~~~~~~ ~~~~~~~
* Rewrite of frontend using Vuetify * Rewrite of frontend using Vuetify
* OIDC scope "profile" now exposes the avatar instead of the official photo
Removed Removed
~~~~~~~ ~~~~~~~
......
...@@ -188,9 +188,9 @@ class CoreConfig(AppConfig): ...@@ -188,9 +188,9 @@ class CoreConfig(AppConfig):
claims["profile"] = django_request.build_absolute_uri( claims["profile"] = django_request.build_absolute_uri(
request.user.person.get_absolute_url() request.user.person.get_absolute_url()
) )
if request.user.person.photo: if request.user.person.avatar:
claims["picture"] = django_request.build_absolute_uri( claims["picture"] = django_request.build_absolute_uri(
request.user.person.photo.url request.user.person.avatar.url
) )
else: else:
claims["given_name"] = request.user.first_name claims["given_name"] = request.user.first_name
......
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