From 1171a5f8ee4679eac31954186f5960c86e540e74 Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Fri, 11 Jun 2021 21:32:37 +0000 Subject: [PATCH] Resolve "OpenID Connect: Describe scopes in grant view" (cherry picked from commit 1938a7735e4466980d30c5536471f88351269063) --- CHANGELOG.rst | 2 ++ aleksis/core/settings.py | 10 +++++----- aleksis/core/templates/oauth2_provider/authorize.html | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fd3a15252..0641f37fa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,8 @@ Changed ~~~~~~~ * Add verbose names for all preference sections. +* Add verbose names for all openid connect scopes and show them in grant + view. Fixed ~~~~~ diff --git a/aleksis/core/settings.py b/aleksis/core/settings.py index 4d53de6fe..d4b986882 100644 --- a/aleksis/core/settings.py +++ b/aleksis/core/settings.py @@ -342,11 +342,11 @@ if _settings.get("oauth2.oidc.enabled", False): ) OAUTH2_PROVIDER["SCOPES"].update( { - "openid": "OpenID Connect scope", - "profile": "Profile scope", - "phone": "Phone scope", - "email": "Email scope", - "address": "Address scope", + "openid": _("OpenID Connect scope"), + "profile": _("Given name, family name, link to profile and picture if existing."), + "address": _("Full home postal address"), + "email": _("Email address"), + "phone": _("Home and mobile phone"), } ) diff --git a/aleksis/core/templates/oauth2_provider/authorize.html b/aleksis/core/templates/oauth2_provider/authorize.html index 53c005d2c..5eaf31510 100644 --- a/aleksis/core/templates/oauth2_provider/authorize.html +++ b/aleksis/core/templates/oauth2_provider/authorize.html @@ -16,7 +16,7 @@ {% trans "Authorize" %} {{ application.name }} </div> <p class="margin-bottom">{% trans "The application requests access to the following scopes:" %}</p> - {% for scope in scopes %} + {% for scope in scopes_descriptions %} <p class="margin-bottom"> <i class="material-icons left">check</i> {{ scope }} -- GitLab