From da2e70465b02e1fc8d906034d5693384e418a65f Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:13:53 +0100 Subject: [PATCH 1/8] sso initial --- requirements.txt | 1 + src/settings.py | 22 ++++++++++++++++++++++ src/urls.py | 4 ++++ 3 files changed, 27 insertions(+) diff --git a/requirements.txt b/requirements.txt index ace2338..1bb7453 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ django-debug-toolbar==4.4.6 docutils==0.21.2 freezegun==1.5.1 django-formtools==2.5.1 +django-allauth==65.3.1 diff --git a/src/settings.py b/src/settings.py index a0b6d3f..71e7331 100644 --- a/src/settings.py +++ b/src/settings.py @@ -112,6 +112,7 @@ 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'feedback.auth.FSDebugRemoteUserMiddleware', + "allauth.account.middleware.AccountMiddleware", # 'whitenoise.middleware.WhiteNoiseMiddleware', # while DEBUG=False servers static files, Note:first pip install whitenoise ] if not TESTING: @@ -147,6 +148,10 @@ 'django.contrib.messages', 'formtools', 'feedback', + 'allauth', + 'allauth.account', + 'allauth.socialaccount', + 'allauth.socialaccount.providers.openid_connect', ] if not TESTING: @@ -157,8 +162,25 @@ 'feedback.auth.FSAccountBackend', 'feedback.auth.TakeoverBackend', 'feedback.auth.VeranstalterBackend', + 'allauth.account.auth_backends.AuthenticationBackend', ) +SOCIALACCOUNT_PROVIDERS = { + "openid_connect": { + "APPS": [ + { + "provider_id": "keycloak", + "name": "Keycloak", + "client_id": "", + "secret": "", + "settings": { + "server_url": "", + }, + } + ] + } +} + # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False. diff --git a/src/urls.py b/src/urls.py index f9ec1b4..980ae7e 100644 --- a/src/urls.py +++ b/src/urls.py @@ -15,6 +15,10 @@ # admin.site.unregister((User, Group)) urlpatterns = [ + path('accounts/', include('allauth.urls')), +] + +urlpatterns += [ re_path(r'^$', RedirectView.as_view(url=reverse_lazy("feedback:default"), permanent=True), name='no-path'), ] From ec6af02372435c3cf7a0d5e6b5ede74a4b0dab20 Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Fri, 17 Jan 2025 22:24:31 +0100 Subject: [PATCH 2/8] make sso login superuser --- src/feedback/views/intern/auth.py | 12 ++++++++++++ src/settings.py | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/src/feedback/views/intern/auth.py b/src/feedback/views/intern/auth.py index 0b629a2..3c605d0 100644 --- a/src/feedback/views/intern/auth.py +++ b/src/feedback/views/intern/auth.py @@ -11,6 +11,7 @@ from feedback.models import Veranstaltung +from allauth.socialaccount.adapter import DefaultSocialAccountAdapter @user_passes_test(lambda u: u.is_superuser) @require_http_methods(('HEAD', 'GET', 'POST')) @@ -54,6 +55,17 @@ def rechte_zuruecknehmen(request): return HttpResponseRedirect(reverse('feedback:intern-index')) +class CustomSocialAccountAdapter(DefaultSocialAccountAdapter): + def pre_social_login(self, request, sociallogin): + super().pre_social_login(request, sociallogin) + user = sociallogin.user + + if user.id: + user.is_superuser = True + user.is_staff = True + user.save() + + def auth_user(request) : if request.method == "POST" : username = request.POST.get("username") diff --git a/src/settings.py b/src/settings.py index 71e7331..5804a96 100644 --- a/src/settings.py +++ b/src/settings.py @@ -165,6 +165,10 @@ 'allauth.account.auth_backends.AuthenticationBackend', ) +ACCOUNT_LOGOUT_REDIRECT_URL ='/accounts/login/' + +SOCIALACCOUNT_ADAPTER = 'feedback.views.intern.auth.CustomSocialAccountAdapter' + SOCIALACCOUNT_PROVIDERS = { "openid_connect": { "APPS": [ From f221d18438acf4dbff8b2637e57ecabf3cf1d3d0 Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Mon, 20 Jan 2025 16:25:36 +0100 Subject: [PATCH 3/8] added allauth custom adapter --- src/feedback/auth_adapter.py | 20 ++++++++++++++ src/feedback/templatetags/translate_url.py | 31 ++++++++++++---------- src/feedback/views/intern/auth.py | 16 ++--------- src/settings.py | 11 ++++++-- src/urls.py | 7 ++++- 5 files changed, 54 insertions(+), 31 deletions(-) create mode 100644 src/feedback/auth_adapter.py diff --git a/src/feedback/auth_adapter.py b/src/feedback/auth_adapter.py new file mode 100644 index 0000000..3436185 --- /dev/null +++ b/src/feedback/auth_adapter.py @@ -0,0 +1,20 @@ +from allauth.socialaccount.adapter import DefaultSocialAccountAdapter +from django.contrib.auth.models import User +from django.conf import settings + +class FeedbackSocialAccountAdapter(DefaultSocialAccountAdapter): + def pre_social_login(self, request, sociallogin): + super().pre_social_login(request, sociallogin) + user = sociallogin.user + + if not user.id: + try : + existing_user = User.objects.get(username=user.username) + sociallogin.connect(request, existing_user) + user = existing_user + except User.DoesNotExist : + user.save() + + user.is_superuser = True + user.is_staff = True + user.save() \ No newline at end of file diff --git a/src/feedback/templatetags/translate_url.py b/src/feedback/templatetags/translate_url.py index abb52e9..b8c9540 100644 --- a/src/feedback/templatetags/translate_url.py +++ b/src/feedback/templatetags/translate_url.py @@ -9,19 +9,22 @@ def translate_url(context, language): ''' used to translate urls for switching languages ''' - try: - view = resolve(context['request'].path_info) - except Resolver404: - return "" - - request_language = translation.get_language() - translation.activate(language) + if 'request' in context : # during some errors this prevents server error + try: + view = resolve(context['request'].path_info) + except Resolver404: + return "" - namespace = view.namespace - view_name = f"{namespace}:{view.url_name}" if namespace else view.url_name - - url = reverse(view_name, args=view.args, kwargs=view.kwargs) - - translation.activate(request_language) - return url + request_language = translation.get_language() + translation.activate(language) + namespace = view.namespace + view_name = f"{namespace}:{view.url_name}" if namespace else view.url_name + + url = reverse(view_name, args=view.args, kwargs=view.kwargs) + + translation.activate(request_language) + return url + else : + return "" + \ No newline at end of file diff --git a/src/feedback/views/intern/auth.py b/src/feedback/views/intern/auth.py index 3c605d0..26ad2f1 100644 --- a/src/feedback/views/intern/auth.py +++ b/src/feedback/views/intern/auth.py @@ -11,8 +11,6 @@ from feedback.models import Veranstaltung -from allauth.socialaccount.adapter import DefaultSocialAccountAdapter - @user_passes_test(lambda u: u.is_superuser) @require_http_methods(('HEAD', 'GET', 'POST')) def rechte_uebernehmen(request): @@ -55,18 +53,8 @@ def rechte_zuruecknehmen(request): return HttpResponseRedirect(reverse('feedback:intern-index')) -class CustomSocialAccountAdapter(DefaultSocialAccountAdapter): - def pre_social_login(self, request, sociallogin): - super().pre_social_login(request, sociallogin) - user = sociallogin.user - - if user.id: - user.is_superuser = True - user.is_staff = True - user.save() - - def auth_user(request) : + ## this view was used before sso as login view if request.method == "POST" : username = request.POST.get("username") password = request.POST.get("password") @@ -95,7 +83,7 @@ def login(request): return response if not settings.DEBUG and not request.user.is_authenticated : - return HttpResponseRedirect(reverse('feedback:auth-user')) + return HttpResponseRedirect(reverse("account_login")) # Apache fordert User zum Login mit FS-Account auf, von daher muss hier nur noch weitergeleitet # werden. diff --git a/src/settings.py b/src/settings.py index 5804a96..59f7d88 100644 --- a/src/settings.py +++ b/src/settings.py @@ -8,6 +8,9 @@ DEBUG = True +# default is False, make True to see exeptions when DEBUG = False +DEBUG_PROPAGATE_EXCEPTIONS = False + ADMINS = ( ('Feedback-Team', 'feedback@lists.d120.de'), ) @@ -112,7 +115,7 @@ 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'feedback.auth.FSDebugRemoteUserMiddleware', - "allauth.account.middleware.AccountMiddleware", + 'allauth.account.middleware.AccountMiddleware', # 'whitenoise.middleware.WhiteNoiseMiddleware', # while DEBUG=False servers static files, Note:first pip install whitenoise ] if not TESTING: @@ -167,7 +170,11 @@ ACCOUNT_LOGOUT_REDIRECT_URL ='/accounts/login/' -SOCIALACCOUNT_ADAPTER = 'feedback.views.intern.auth.CustomSocialAccountAdapter' + +SOCIALACCOUNT_ADAPTER = 'feedback.auth_adapter.FeedbackSocialAccountAdapter' + +SOCIALACCOUNT_ONLY = True +ACCOUNT_EMAIL_VERIFICATION = 'none' SOCIALACCOUNT_PROVIDERS = { "openid_connect": { diff --git a/src/urls.py b/src/urls.py index 980ae7e..687e0df 100644 --- a/src/urls.py +++ b/src/urls.py @@ -10,10 +10,15 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings +from allauth.account.decorators import secure_admin_login + # Admin-Seiten konfigurieren -admin.autodiscover() # admin.site.unregister((User, Group)) +# this is a workaround as admin sites doesn't use allauth, see: https://docs.allauth.org/en/latest/common/admin.html +admin.autodiscover() +admin.site.login = secure_admin_login(admin.site.login) + urlpatterns = [ path('accounts/', include('allauth.urls')), ] From abd2b5ee8ec0b26d57d47adc9ae8af6f9b62321e Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:21:51 +0100 Subject: [PATCH 4/8] added templates for allauth --- src/templates/allauth/elements/alert.html | 5 ++ src/templates/allauth/elements/badge.html | 5 ++ src/templates/allauth/elements/button.html | 14 +++ .../allauth/elements/button_group.html | 5 ++ src/templates/allauth/elements/field.html | 47 ++++++++++ src/templates/allauth/elements/fields.html | 1 + src/templates/allauth/elements/form.html | 7 ++ src/templates/allauth/elements/h1.html | 1 + src/templates/allauth/elements/h2.html | 1 + src/templates/allauth/elements/hr.html | 1 + src/templates/allauth/elements/img.html | 2 + src/templates/allauth/elements/p.html | 1 + src/templates/allauth/elements/panel.html | 14 +++ src/templates/allauth/elements/provider.html | 3 + .../allauth/elements/provider_list.html | 5 ++ src/templates/allauth/elements/table.html | 5 ++ src/templates/allauth/elements/tbody.html | 5 ++ src/templates/allauth/elements/td.html | 5 ++ src/templates/allauth/elements/th.html | 5 ++ src/templates/allauth/elements/thead.html | 5 ++ src/templates/allauth/elements/tr.html | 5 ++ src/templates/allauth/layouts/base.html | 87 +++++++++++++++++++ src/templates/allauth/layouts/entrance.html | 2 + src/templates/allauth/layouts/manage.html | 2 + .../socialaccount/authentication_error.html | 14 +++ .../socialaccount/base_entrance.html | 1 + src/templates/socialaccount/base_manage.html | 1 + src/templates/socialaccount/connections.html | 54 ++++++++++++ .../email/account_connected_message.txt | 4 + .../email/account_connected_subject.txt | 4 + .../email/account_disconnected_message.txt | 4 + .../email/account_disconnected_subject.txt | 4 + src/templates/socialaccount/login.html | 31 +++++++ .../socialaccount/login_cancelled.html | 15 ++++ .../socialaccount/login_redirect.html | 13 +++ .../messages/account_connected.txt | 2 + .../messages/account_connected_other.txt | 2 + .../messages/account_connected_updated.txt | 1 + .../messages/account_disconnected.txt | 2 + src/templates/socialaccount/signup.html | 29 +++++++ .../socialaccount/snippets/login.html | 15 ++++ .../socialaccount/snippets/login_extra.html | 2 + .../socialaccount/snippets/provider_list.html | 18 ++++ 43 files changed, 449 insertions(+) create mode 100644 src/templates/allauth/elements/alert.html create mode 100644 src/templates/allauth/elements/badge.html create mode 100644 src/templates/allauth/elements/button.html create mode 100644 src/templates/allauth/elements/button_group.html create mode 100644 src/templates/allauth/elements/field.html create mode 100644 src/templates/allauth/elements/fields.html create mode 100644 src/templates/allauth/elements/form.html create mode 100644 src/templates/allauth/elements/h1.html create mode 100644 src/templates/allauth/elements/h2.html create mode 100644 src/templates/allauth/elements/hr.html create mode 100644 src/templates/allauth/elements/img.html create mode 100644 src/templates/allauth/elements/p.html create mode 100644 src/templates/allauth/elements/panel.html create mode 100644 src/templates/allauth/elements/provider.html create mode 100644 src/templates/allauth/elements/provider_list.html create mode 100644 src/templates/allauth/elements/table.html create mode 100644 src/templates/allauth/elements/tbody.html create mode 100644 src/templates/allauth/elements/td.html create mode 100644 src/templates/allauth/elements/th.html create mode 100644 src/templates/allauth/elements/thead.html create mode 100644 src/templates/allauth/elements/tr.html create mode 100644 src/templates/allauth/layouts/base.html create mode 100644 src/templates/allauth/layouts/entrance.html create mode 100644 src/templates/allauth/layouts/manage.html create mode 100644 src/templates/socialaccount/authentication_error.html create mode 100644 src/templates/socialaccount/base_entrance.html create mode 100644 src/templates/socialaccount/base_manage.html create mode 100644 src/templates/socialaccount/connections.html create mode 100644 src/templates/socialaccount/email/account_connected_message.txt create mode 100644 src/templates/socialaccount/email/account_connected_subject.txt create mode 100644 src/templates/socialaccount/email/account_disconnected_message.txt create mode 100644 src/templates/socialaccount/email/account_disconnected_subject.txt create mode 100644 src/templates/socialaccount/login.html create mode 100644 src/templates/socialaccount/login_cancelled.html create mode 100644 src/templates/socialaccount/login_redirect.html create mode 100644 src/templates/socialaccount/messages/account_connected.txt create mode 100644 src/templates/socialaccount/messages/account_connected_other.txt create mode 100644 src/templates/socialaccount/messages/account_connected_updated.txt create mode 100644 src/templates/socialaccount/messages/account_disconnected.txt create mode 100644 src/templates/socialaccount/signup.html create mode 100644 src/templates/socialaccount/snippets/login.html create mode 100644 src/templates/socialaccount/snippets/login_extra.html create mode 100644 src/templates/socialaccount/snippets/provider_list.html diff --git a/src/templates/allauth/elements/alert.html b/src/templates/allauth/elements/alert.html new file mode 100644 index 0000000..e3a7e19 --- /dev/null +++ b/src/templates/allauth/elements/alert.html @@ -0,0 +1,5 @@ +{% load allauth %} +

+ {% slot message %} + {% endslot %} +

diff --git a/src/templates/allauth/elements/badge.html b/src/templates/allauth/elements/badge.html new file mode 100644 index 0000000..ba9b152 --- /dev/null +++ b/src/templates/allauth/elements/badge.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} + diff --git a/src/templates/allauth/elements/button.html b/src/templates/allauth/elements/button.html new file mode 100644 index 0000000..3dc1fc8 --- /dev/null +++ b/src/templates/allauth/elements/button.html @@ -0,0 +1,14 @@ +{% load allauth %} +{% comment %} djlint:off {% endcomment %} +<{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %} +{% if attrs.form %}form="{{ attrs.form }}"{% endif %} +{% if attrs.id %}id="{{ attrs.id }}"{% endif %} +{% if attrs.name %}name="{{ attrs.name }}"{% endif %} +{% if attrs.value %}value="{{ attrs.value }}"{% endif %} +{% if attrs.type %}type="{{ attrs.type }}"{% endif %} +{% if attrs.id %}id="{{ attrs.id }}"{% endif %} +class="btn btn-primary {% if attrs.class %}{{ attrs.class }}{% endif %}" +> +{% slot %} +{% endslot %} + diff --git a/src/templates/allauth/elements/button_group.html b/src/templates/allauth/elements/button_group.html new file mode 100644 index 0000000..7b6f9fb --- /dev/null +++ b/src/templates/allauth/elements/button_group.html @@ -0,0 +1,5 @@ +{% load allauth %} +
+ {% slot %} + {% endslot %} +
diff --git a/src/templates/allauth/elements/field.html b/src/templates/allauth/elements/field.html new file mode 100644 index 0000000..9b024ae --- /dev/null +++ b/src/templates/allauth/elements/field.html @@ -0,0 +1,47 @@ +{% load allauth %} +{{ attrs.errors }} +

+ {% if attrs.type == "textarea" %} + + + {% else %} + {% if attrs.type != "checkbox" and attrs.type != "radio" %} + + {% endif %} + + {% if attrs.type == "checkbox" or attrs.type == "radio" %} + + {% endif %} + {% endif %} + {% if slots.help_text %} + + {% slot help_text %} + {% endslot %} + + {% endif %} +

diff --git a/src/templates/allauth/elements/fields.html b/src/templates/allauth/elements/fields.html new file mode 100644 index 0000000..62797cf --- /dev/null +++ b/src/templates/allauth/elements/fields.html @@ -0,0 +1 @@ +{{ attrs.form.as_p }} diff --git a/src/templates/allauth/elements/form.html b/src/templates/allauth/elements/form.html new file mode 100644 index 0000000..afcbe61 --- /dev/null +++ b/src/templates/allauth/elements/form.html @@ -0,0 +1,7 @@ +{% load allauth %} +
+ {% slot body %} + {% endslot %} + {% slot actions %} + {% endslot %} +
diff --git a/src/templates/allauth/elements/h1.html b/src/templates/allauth/elements/h1.html new file mode 100644 index 0000000..c9b6100 --- /dev/null +++ b/src/templates/allauth/elements/h1.html @@ -0,0 +1 @@ +{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/src/templates/allauth/elements/h2.html b/src/templates/allauth/elements/h2.html new file mode 100644 index 0000000..48f9d1f --- /dev/null +++ b/src/templates/allauth/elements/h2.html @@ -0,0 +1 @@ +{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/src/templates/allauth/elements/hr.html b/src/templates/allauth/elements/hr.html new file mode 100644 index 0000000..e123ba7 --- /dev/null +++ b/src/templates/allauth/elements/hr.html @@ -0,0 +1 @@ +
diff --git a/src/templates/allauth/elements/img.html b/src/templates/allauth/elements/img.html new file mode 100644 index 0000000..ae9280a --- /dev/null +++ b/src/templates/allauth/elements/img.html @@ -0,0 +1,2 @@ + diff --git a/src/templates/allauth/elements/p.html b/src/templates/allauth/elements/p.html new file mode 100644 index 0000000..59c270c --- /dev/null +++ b/src/templates/allauth/elements/p.html @@ -0,0 +1 @@ +{% comment %} djlint:off {% endcomment %}{% load allauth %}

{% slot %}{% endslot %}

diff --git a/src/templates/allauth/elements/panel.html b/src/templates/allauth/elements/panel.html new file mode 100644 index 0000000..82248a3 --- /dev/null +++ b/src/templates/allauth/elements/panel.html @@ -0,0 +1,14 @@ +{% load allauth %} +
+

+ {% slot title %} + {% endslot %} +

+ {% slot body %} + {% endslot %} + {% if slots.actions %} + + {% endif %} +
diff --git a/src/templates/allauth/elements/provider.html b/src/templates/allauth/elements/provider.html new file mode 100644 index 0000000..2e44483 --- /dev/null +++ b/src/templates/allauth/elements/provider.html @@ -0,0 +1,3 @@ +
  • + {{ attrs.name }} +
  • diff --git a/src/templates/allauth/elements/provider_list.html b/src/templates/allauth/elements/provider_list.html new file mode 100644 index 0000000..c187e5d --- /dev/null +++ b/src/templates/allauth/elements/provider_list.html @@ -0,0 +1,5 @@ +{% load allauth %} + diff --git a/src/templates/allauth/elements/table.html b/src/templates/allauth/elements/table.html new file mode 100644 index 0000000..6876e9f --- /dev/null +++ b/src/templates/allauth/elements/table.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} +
    diff --git a/src/templates/allauth/elements/tbody.html b/src/templates/allauth/elements/tbody.html new file mode 100644 index 0000000..ddbe91e --- /dev/null +++ b/src/templates/allauth/elements/tbody.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} + diff --git a/src/templates/allauth/elements/td.html b/src/templates/allauth/elements/td.html new file mode 100644 index 0000000..d4cc759 --- /dev/null +++ b/src/templates/allauth/elements/td.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} + diff --git a/src/templates/allauth/elements/th.html b/src/templates/allauth/elements/th.html new file mode 100644 index 0000000..c344351 --- /dev/null +++ b/src/templates/allauth/elements/th.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} + diff --git a/src/templates/allauth/elements/thead.html b/src/templates/allauth/elements/thead.html new file mode 100644 index 0000000..6b22db7 --- /dev/null +++ b/src/templates/allauth/elements/thead.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} + diff --git a/src/templates/allauth/elements/tr.html b/src/templates/allauth/elements/tr.html new file mode 100644 index 0000000..78b99d5 --- /dev/null +++ b/src/templates/allauth/elements/tr.html @@ -0,0 +1,5 @@ +{% load allauth %} + + {% slot %} + {% endslot %} + diff --git a/src/templates/allauth/layouts/base.html b/src/templates/allauth/layouts/base.html new file mode 100644 index 0000000..40b891d --- /dev/null +++ b/src/templates/allauth/layouts/base.html @@ -0,0 +1,87 @@ +{% extends "d120_base.html" %} +{% load i18n %} + + + + + + + {% block head_title %} + {% endblock head_title %} + + {% block extra_head %} + {% endblock extra_head %} + + + {% block body %} + {% if messages %} +
    + {% trans "Messages:" %} + +
    + {% endif %} +
    + {% trans "Menu:" %} + +
    + {% block content %} + {% endblock content %} + {% endblock body %} + {% block extra_body %} + {% endblock extra_body %} + + diff --git a/src/templates/allauth/layouts/entrance.html b/src/templates/allauth/layouts/entrance.html new file mode 100644 index 0000000..cce546a --- /dev/null +++ b/src/templates/allauth/layouts/entrance.html @@ -0,0 +1,2 @@ +{% extends "allauth/layouts/base.html" %} +{% block content %}{% endblock %} diff --git a/src/templates/allauth/layouts/manage.html b/src/templates/allauth/layouts/manage.html new file mode 100644 index 0000000..cce546a --- /dev/null +++ b/src/templates/allauth/layouts/manage.html @@ -0,0 +1,2 @@ +{% extends "allauth/layouts/base.html" %} +{% block content %}{% endblock %} diff --git a/src/templates/socialaccount/authentication_error.html b/src/templates/socialaccount/authentication_error.html new file mode 100644 index 0000000..985d950 --- /dev/null +++ b/src/templates/socialaccount/authentication_error.html @@ -0,0 +1,14 @@ +{% extends "socialaccount/base_entrance.html" %} +{% load i18n %} +{% load allauth %} +{% block head_title %} + {% trans "Third-Party Login Failure" %} +{% endblock head_title %} +{% block content %} + {% element h1 %} + {% trans "Third-Party Login Failure" %} + {% endelement %} + {% element p %} + {% trans "An error occurred while attempting to login via your third-party account." %} + {% endelement %} +{% endblock content %} diff --git a/src/templates/socialaccount/base_entrance.html b/src/templates/socialaccount/base_entrance.html new file mode 100644 index 0000000..0cd8aaa --- /dev/null +++ b/src/templates/socialaccount/base_entrance.html @@ -0,0 +1 @@ +{% extends "allauth/layouts/entrance.html" %} diff --git a/src/templates/socialaccount/base_manage.html b/src/templates/socialaccount/base_manage.html new file mode 100644 index 0000000..ba6316b --- /dev/null +++ b/src/templates/socialaccount/base_manage.html @@ -0,0 +1 @@ +{% extends "allauth/layouts/manage.html" %} diff --git a/src/templates/socialaccount/connections.html b/src/templates/socialaccount/connections.html new file mode 100644 index 0000000..d45a6cc --- /dev/null +++ b/src/templates/socialaccount/connections.html @@ -0,0 +1,54 @@ +{% extends "socialaccount/base_manage.html" %} +{% load i18n %} +{% load allauth %} +{% block head_title %} + {% trans "Account Connections" %} +{% endblock head_title %} +{% block content %} + {% element h1 %} + {% trans "Account Connections" %} + {% endelement %} + {% if form.accounts %} + {% element p %} + {% blocktrans %}You can sign in to your account using any of the following third-party accounts:{% endblocktrans %} + {% endelement %} + {% url 'socialaccount_connections' as action_url %} + {% element form form=form method="post" action=action_url %} + {% slot body %} + {% csrf_token %} + {% for acc in form.fields.account.choices %} + {% with account=acc.0.instance.get_provider_account %} + {% setvar radio_id %} + id_account_{{ account.account.pk }} + {% endsetvar %} + {% setvar tags %} + socialaccount,{{ account.account.provider }} + {% endsetvar %} + {% element field id=radio_id type="radio" name="account" value=account.account.pk %} + {% slot label %} + {{ account }} + {% element badge tags=tags %} + {{ account.get_brand.name }} + {% endelement %} + {% endslot %} + {% endelement %} + {% endwith %} + {% endfor %} + {% endslot %} + {% slot actions %} + {% element button tags="delete,danger" type="submit" %} + {% trans 'Remove' %} + {% endelement %} + {% endslot %} + {% endelement %} + {% else %} + {% element p %} + {% trans 'You currently have no third-party accounts connected to this account.' %} + {% endelement %} + {% endif %} + {% element h2 %} + {% trans 'Add a Third-Party Account' %} + {% endelement %} + {% include "socialaccount/snippets/provider_list.html" with process="connect" %} + {% include "socialaccount/snippets/login_extra.html" %} +{% endblock content %} diff --git a/src/templates/socialaccount/email/account_connected_message.txt b/src/templates/socialaccount/email/account_connected_message.txt new file mode 100644 index 0000000..2e005d8 --- /dev/null +++ b/src/templates/socialaccount/email/account_connected_message.txt @@ -0,0 +1,4 @@ +{% extends "account/email/base_notification.txt" %} +{% load i18n %} + +{% block notification_message %}{% blocktrans %}A third-party account from {{ provider }} has been connected to your account.{% endblocktrans %}{% endblock notification_message %} diff --git a/src/templates/socialaccount/email/account_connected_subject.txt b/src/templates/socialaccount/email/account_connected_subject.txt new file mode 100644 index 0000000..2bdee74 --- /dev/null +++ b/src/templates/socialaccount/email/account_connected_subject.txt @@ -0,0 +1,4 @@ +{% load i18n %} +{% autoescape off %} +{% blocktrans %}Third-Party Account Connected{% endblocktrans %} +{% endautoescape %} diff --git a/src/templates/socialaccount/email/account_disconnected_message.txt b/src/templates/socialaccount/email/account_disconnected_message.txt new file mode 100644 index 0000000..31e3070 --- /dev/null +++ b/src/templates/socialaccount/email/account_disconnected_message.txt @@ -0,0 +1,4 @@ +{% extends "account/email/base_notification.txt" %} +{% load i18n %} + +{% block notification_message %}{% blocktrans %}A third-party account from {{ provider }} has been disconnected from your account.{% endblocktrans %}{% endblock notification_message %} diff --git a/src/templates/socialaccount/email/account_disconnected_subject.txt b/src/templates/socialaccount/email/account_disconnected_subject.txt new file mode 100644 index 0000000..067d6db --- /dev/null +++ b/src/templates/socialaccount/email/account_disconnected_subject.txt @@ -0,0 +1,4 @@ +{% load i18n %} +{% autoescape off %} +{% blocktrans %}Third-Party Account Disconnected{% endblocktrans %} +{% endautoescape %} diff --git a/src/templates/socialaccount/login.html b/src/templates/socialaccount/login.html new file mode 100644 index 0000000..a17a5d6 --- /dev/null +++ b/src/templates/socialaccount/login.html @@ -0,0 +1,31 @@ +{% extends "socialaccount/base_entrance.html" %} +{% load i18n %} +{% load allauth %} +{% block head_title %} + {% trans "Sign In" %} +{% endblock head_title %} +{% block content %} + {% if process == "connect" %} + {% element h1 %} + {% blocktrans with provider.name as provider %}Connect {{ provider }}{% endblocktrans %} + {% endelement %} + {% element p %} + {% blocktrans with provider.name as provider %}You are about to connect a new third-party account from {{ provider }}.{% endblocktrans %} + {% endelement %} + {% else %} + {% element h1 %} + {% blocktrans with provider.name as provider %}Sign In Via {{ provider }}{% endblocktrans %} + {% endelement %} + {% element p %} + {% blocktrans with provider.name as provider %}You are about to sign in using a third-party account from {{ provider }}.{% endblocktrans %} + {% endelement %} + {% endif %} + {% element form method="post" no_visible_fields=True %} + {% slot actions %} + {% csrf_token %} + {% element button type="submit" %} + {% trans "Continue" %} + {% endelement %} + {% endslot %} + {% endelement %} +{% endblock content %} diff --git a/src/templates/socialaccount/login_cancelled.html b/src/templates/socialaccount/login_cancelled.html new file mode 100644 index 0000000..a89be06 --- /dev/null +++ b/src/templates/socialaccount/login_cancelled.html @@ -0,0 +1,15 @@ +{% extends "socialaccount/base_entrance.html" %} +{% load i18n %} +{% load allauth %} +{% block head_title %} + {% trans "Login Cancelled" %} +{% endblock head_title %} +{% block content %} + {% element h1 %} + {% trans "Login Cancelled" %} + {% endelement %} + {% url 'account_login' as login_url %} + {% element p %} + {% blocktrans %}You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to sign in.{% endblocktrans %} + {% endelement %} +{% endblock content %} diff --git a/src/templates/socialaccount/login_redirect.html b/src/templates/socialaccount/login_redirect.html new file mode 100644 index 0000000..5b4367e --- /dev/null +++ b/src/templates/socialaccount/login_redirect.html @@ -0,0 +1,13 @@ + + + {% load i18n allauth %} + + {% translate "Sign In" %} | {{ provider }} + + + + {% element p %} + {% translate "Continue" %} + {% endelement %} + + diff --git a/src/templates/socialaccount/messages/account_connected.txt b/src/templates/socialaccount/messages/account_connected.txt new file mode 100644 index 0000000..590d321 --- /dev/null +++ b/src/templates/socialaccount/messages/account_connected.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}The third-party account has been connected.{% endblocktrans %} diff --git a/src/templates/socialaccount/messages/account_connected_other.txt b/src/templates/socialaccount/messages/account_connected_other.txt new file mode 100644 index 0000000..1829a04 --- /dev/null +++ b/src/templates/socialaccount/messages/account_connected_other.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}The third-party account is already connected to a different account.{% endblocktrans %} diff --git a/src/templates/socialaccount/messages/account_connected_updated.txt b/src/templates/socialaccount/messages/account_connected_updated.txt new file mode 100644 index 0000000..3f7174e --- /dev/null +++ b/src/templates/socialaccount/messages/account_connected_updated.txt @@ -0,0 +1 @@ +{% extends "socialaccount/messages/account_connected.txt" %} diff --git a/src/templates/socialaccount/messages/account_disconnected.txt b/src/templates/socialaccount/messages/account_disconnected.txt new file mode 100644 index 0000000..94a3c09 --- /dev/null +++ b/src/templates/socialaccount/messages/account_disconnected.txt @@ -0,0 +1,2 @@ +{% load i18n %} +{% blocktrans %}The third-party account has been disconnected.{% endblocktrans %} diff --git a/src/templates/socialaccount/signup.html b/src/templates/socialaccount/signup.html new file mode 100644 index 0000000..5b128f3 --- /dev/null +++ b/src/templates/socialaccount/signup.html @@ -0,0 +1,29 @@ +{% extends "socialaccount/base_entrance.html" %} +{% load i18n %} +{% load allauth %} +{% block head_title %} + {% trans "Signup" %} +{% endblock head_title %} +{% block content %} + {% element h1 %} + {% trans "Sign Up" %} + {% endelement %} + {% element p %} + {% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to +{{site_name}}. As a final step, please complete the following form:{% endblocktrans %} + {% endelement %} + {% url 'socialaccount_signup' as action_url %} + {% element form form=form method="post" action=action_url %} + {% slot body %} + {% csrf_token %} + {% element fields form=form unlabeled=True %} + {% endelement %} + {{ redirect_field }} + {% endslot %} + {% slot actions %} + {% element button type="submit" %} + {% trans "Sign Up" %} + {% endelement %} + {% endslot %} + {% endelement %} +{% endblock content %} diff --git a/src/templates/socialaccount/snippets/login.html b/src/templates/socialaccount/snippets/login.html new file mode 100644 index 0000000..cc26953 --- /dev/null +++ b/src/templates/socialaccount/snippets/login.html @@ -0,0 +1,15 @@ +{% load i18n %} +{% load allauth %} +{% load socialaccount %} +{% get_providers as socialaccount_providers %} +{% if socialaccount_providers %} + {% if not SOCIALACCOUNT_ONLY %} + {% element hr %} + {% endelement %} + {% element h2 %} + {% translate "Or use a third-party" %} + {% endelement %} + {% endif %} + {% include "socialaccount/snippets/provider_list.html" with process="login" %} + {% include "socialaccount/snippets/login_extra.html" %} +{% endif %} diff --git a/src/templates/socialaccount/snippets/login_extra.html b/src/templates/socialaccount/snippets/login_extra.html new file mode 100644 index 0000000..fe81dac --- /dev/null +++ b/src/templates/socialaccount/snippets/login_extra.html @@ -0,0 +1,2 @@ +{% load socialaccount %} +{% providers_media_js %} diff --git a/src/templates/socialaccount/snippets/provider_list.html b/src/templates/socialaccount/snippets/provider_list.html new file mode 100644 index 0000000..0273cf4 --- /dev/null +++ b/src/templates/socialaccount/snippets/provider_list.html @@ -0,0 +1,18 @@ +{% load allauth socialaccount %} +{% get_providers as socialaccount_providers %} +{% if socialaccount_providers %} + {% element provider_list %} + {% for provider in socialaccount_providers %} + {% if provider.id == "openid" %} + {% for brand in provider.get_brands %} + {% provider_login_url provider openid=brand.openid_url process=process as href %} + {% element provider name=brand.name provider_id=provider.id href=href %} + {% endelement %} + {% endfor %} + {% endif %} + {% provider_login_url provider process=process scope=scope auth_params=auth_params as href %} + {% element provider name=provider.name provider_id=provider.id href=href %} + {% endelement %} + {% endfor %} + {% endelement %} +{% endif %} From d70f1def43913d8af4e4c8f2b4435dc8f06e8f46 Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Wed, 22 Jan 2025 23:10:12 +0100 Subject: [PATCH 5/8] added transaltions --- src/locale/de/LC_MESSAGES/django.mo | Bin 380 -> 3853 bytes src/locale/de/LC_MESSAGES/django.po | 235 +++++++++++++++++++++++----- src/locale/en/LC_MESSAGES/django.po | 228 ++++++++++++++++++++++----- src/urls.py | 4 +- 4 files changed, 395 insertions(+), 72 deletions(-) diff --git a/src/locale/de/LC_MESSAGES/django.mo b/src/locale/de/LC_MESSAGES/django.mo index 71cbdf3e9d8d54be31066ec4ad8628bc2c1f2845..21fa752fae783f54f039080262e8554fe5467ea5 100644 GIT binary patch literal 3853 zcmcImO^hSO6|V4)*$^NkKuF;2DhoSe+6zcX;N4m9u04yj_RKJz-4$F=xw~vvrd?%K zSC4l_iWDhQj!`Z_B8e0!N-iiDqzEa}o|qiCamy`8+~9@;ms}9vt8S0&9d8hav^4X% z-Bqu@_r34E@+Xhn^?QNqB>sMizn_0kh_k@eJMa(JXTU4K&w*ROm+lnehrr(ep8);= z*aH3ocmnt}@CU#L?h@ir;FG}nfX@T@`&WSX16$?uF7O`Q4}rYS0`CRh06q@&x1La>(r| zAYTs`5d6a*S$Fm->n-Z!huS64SUSH?GLCI-JoTL&(djc|XZLiX+)746nNd$EL$NhR z#a<=kE$!RfO*d7)d#prfvvA>^w*)NdTq@qFt;s|^Nl4O8AiWhx*Nau6Zb&(29oaa} zodd(kP^XHd_i8lu+6GWnxX4%BLM3iI}|*vtzqw$;e)DbdBMkX=^~47H3Xk*x7h zo4GGOTpb6@$6{xw<^xZQvZQX+Z(loKm)kGb8OhWsnd~o`LQdp8FwQs$=OPrg+olBpnp*+1zvK~zwO9Tt$89QpBoYQoV_s^0zY=&U>S$*F&a-`5~(>6S^tGAWYXENUBYg5~21R|Frgp+K`__$WA(vPhnx=3|2TxNn`(*pK z1X$81@H9&tdd>KBA70y2Wb86!v#I#S+(5LWEDLE86=Twbp#p|z9&S{0>VTyNPaZTZ zK*`Y>#TW0ojcbBqdRcbMPykdf>C254`a#tN`gs~Q@;$7z@4V~(*ojQFc42HLJ zm#$=|E|dzLKPxX(#g?$p$)! zF6M(Q+OajNY;8u{YESc?s3E~W^%sWel68i>jtwm zV9;rGnlsujRG+W#tU{YaJNsks@#=;@J5HrG=O`XZmnpw?b!R<#dA5#ep`W9siEV25SSzcM8Hd|!?ZtEOB0pI>W9Z}>y|8kwBATdT!)foO>1o*0?Sh1* zJ!=-m8%=VTC=|?73w0UMm13E4z1$?qRKH^&jz1r0pghKs@l_E5vo1Ytk{r|C+%EJ` zn}fW6c$1f0RC+}0fjl0r!jJKg4sZ69Iqc2LDIDKccVkHyT6&k|f+~Zdu2TZzw>cQNYf?`9)LkEJ0kFy7H zX-~O{Vil>Y6;r{dP!p_fAAXR9ZC&jT3OS0fcs7e)j0= zorqa9)2OHPVzx%SHBlO8)GiuZnP_@S_4NV7g4Q^~6})5;N+fo#2A3F>tEI9XYng+b zE6X-!C;dNT1;5XFbLNBcREi3fS%HPqs)901`v50bnh{Q@0~nLK>`{;3n};{?YpF0M zMhnJ#0@L95g1DFmJYw=xa?{|@;S_fdKfupWKFQF6OsOb0+kCof$-uz|CO1D3WN04l z5e_><0SqC^0enQe95h%5U$X9Hx2)m^PBEl_+3_hAidmGR2pCvm)AHuo><43NEpyyq16Z58_rn1j#!keNugN_~j{^V)Lg U+Z}vOZTR3-hL1k}*??L34gM*MP5=M^ delta 66 xcmeB``@>{$Pl#nI0}wC*u?!Ha05LNV>i{tbSOBpTP|^}egVeylW*!a~MgaZ51)Kl? diff --git a/src/locale/de/LC_MESSAGES/django.po b/src/locale/de/LC_MESSAGES/django.po index bc296db..898b21f 100644 --- a/src/locale/de/LC_MESSAGES/django.po +++ b/src/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-22 11:24+0100\n" +"POT-Creation-Date: 2025-01-20 17:24+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -468,7 +468,7 @@ msgstr "" #: feedback/models/base.py:717 #: templates/formtools/wizard/email_zusammenfassung.html:74 -#: templates/veranstalter/dashboard.html:110 +#: templates/veranstalter/dashboard.html:113 msgid "Anmerkung" msgstr "" @@ -479,7 +479,7 @@ msgstr "" #: feedback/models/base.py:729 #: templates/formtools/wizard/email_zusammenfassung.html:66 #: templates/formtools/wizard/zusammenfassung.html:61 -#: templates/veranstalter/dashboard.html:102 +#: templates/veranstalter/dashboard.html:105 msgid "Tutoren" msgstr "" @@ -523,17 +523,17 @@ msgstr "" msgid "Evaluation" msgstr "" -#: feedback/views/veranstalter.py:93 templates/feedback/person_form.html:19 +#: feedback/views/veranstalter.py:93 templates/feedback/person_form.html:21 #: templates/veranstalter/index.html:36 templates/veranstalter/index.html:43 msgid "Basisdaten" msgstr "" -#: feedback/views/veranstalter.py:95 templates/feedback/person_form.html:21 +#: feedback/views/veranstalter.py:95 templates/feedback/person_form.html:23 #: templates/veranstalter/index.html:38 msgid "Freie Fragen" msgstr "" -#: feedback/views/veranstalter.py:97 templates/feedback/person_form.html:23 +#: feedback/views/veranstalter.py:97 templates/feedback/person_form.html:25 #: templates/veranstalter/index.html:40 msgid "Zusammenfassung" msgstr "" @@ -553,11 +553,11 @@ msgstr "" msgid "Nachfolgend finder Sie Informationen zu Ihrer Bestellung" msgstr "" -#: settings.py:45 +#: settings.py:48 msgid "German" msgstr "" -#: settings.py:46 +#: settings.py:49 msgid "English" msgstr "" @@ -628,6 +628,50 @@ msgstr "" msgid "Es wird der Status für folgende Veranstaltungen geändert:" msgstr "" +#: templates/allauth/layouts/base.html:19 +msgid "Messages:" +msgstr "Nachrichten:" + +#: templates/allauth/layouts/base.html:26 +msgid "Menu:" +msgstr "" + +#: templates/allauth/layouts/base.html:32 +msgid "Change Email" +msgstr "Email ändern" + +#: templates/allauth/layouts/base.html:38 +msgid "Change Password" +msgstr "Password ändern" + +#: templates/allauth/layouts/base.html:44 +#: templates/socialaccount/connections.html:5 +#: templates/socialaccount/connections.html:9 +msgid "Account Connections" +msgstr "Konto-Verbindungen" + +#: templates/allauth/layouts/base.html:50 +msgid "Two-Factor Authentication" +msgstr "Zwei-Faktoren-Authentifizierung" + +#: templates/allauth/layouts/base.html:56 +msgid "Sessions" +msgstr "Sitzungen" + +#: templates/allauth/layouts/base.html:62 +msgid "Sign Out" +msgstr "Abmelden" + +#: templates/allauth/layouts/base.html:69 templates/socialaccount/login.html:5 +#: templates/socialaccount/login_redirect.html:5 +msgid "Sign In" +msgstr "Anmelden" + +#: templates/allauth/layouts/base.html:75 templates/socialaccount/signup.html:9 +#: templates/socialaccount/signup.html:25 +msgid "Sign Up" +msgstr "Registrieren" + #: templates/bestellung_base.html:10 msgid "zurück zum internen Bereich" msgstr "" @@ -727,39 +771,39 @@ msgstr "" msgid "%(veranstaltung.name)s (%(veranstaltung.semester.short)s)" msgstr "" -#: templates/feedback/person_form.html:12 +#: templates/feedback/person_form.html:13 #: templates/formtools/wizard/base.html:74 templates/veranstalter/index.html:15 msgid "ausloggen" msgstr "" -#: templates/feedback/person_form.html:16 +#: templates/feedback/person_form.html:18 msgid "Fragebogenbestellung Schritt 2 von 5" msgstr "" -#: templates/feedback/person_form.html:17 templates/intern/index.html:30 +#: templates/feedback/person_form.html:19 templates/intern/index.html:30 #: templates/veranstalter/index.html:33 msgid "Ablauf" msgstr "" -#: templates/feedback/person_form.html:20 -#: templates/feedback/person_form.html:25 templates/veranstalter/index.html:37 +#: templates/feedback/person_form.html:22 +#: templates/feedback/person_form.html:27 templates/veranstalter/index.html:37 msgid "Datenüberprüfung" msgstr "" -#: templates/feedback/person_form.html:22 templates/veranstalter/index.html:39 +#: templates/feedback/person_form.html:24 templates/veranstalter/index.html:39 msgid "Details zur Übung" msgstr "" -#: templates/feedback/person_form.html:27 +#: templates/feedback/person_form.html:29 msgid "Bitte überprüfen Sie jetzt die Daten des Verantwortlichen " msgstr "" -#: templates/feedback/person_form.html:27 +#: templates/feedback/person_form.html:29 #, python-format msgid "%(veranstaltung.verantwortlich)s" msgstr "" -#: templates/feedback/person_form.html:30 +#: templates/feedback/person_form.html:32 msgid "weiter" msgstr "" @@ -771,15 +815,15 @@ msgstr "" msgid "Bestellprozess " msgstr "" -#: templates/formtools/wizard/base.html:79 +#: templates/formtools/wizard/base.html:80 msgid "Bestellung für " msgstr "" -#: templates/formtools/wizard/base.html:106 +#: templates/formtools/wizard/base.html:107 msgid "Pflichtfeld" msgstr "" -#: templates/formtools/wizard/base.html:108 +#: templates/formtools/wizard/base.html:109 #: templates/intern/import_vv_edit_users_update.html:26 #: templates/intern/import_vv_edit_users_update.html:29 #: templates/intern/tans/process_tans.html:21 @@ -787,14 +831,14 @@ msgstr "" msgid "Zurück" msgstr "" -#: templates/formtools/wizard/base.html:112 +#: templates/formtools/wizard/base.html:113 #: templates/intern/import_vv_edit.html:87 #: templates/intern/tans/process_tans.html:23 #: templates/veranstalter/index.html:75 msgid "Weiter" msgstr "" -#: templates/formtools/wizard/base.html:116 +#: templates/formtools/wizard/base.html:117 #: templates/veranstalter/index.html:102 msgid "Speichern" msgstr "" @@ -817,8 +861,8 @@ msgstr "" msgid "Die Bestellung wurde entgegengenommen" msgstr "" -#: templates/formtools/wizard/bestellung_done.html:7 -#: templates/intern/index.html:16 templates/veranstalter/dashboard.html:65 +#: templates/formtools/wizard/bestellung_done.html:9 +#: templates/intern/index.html:19 templates/veranstalter/dashboard.html:67 msgid "Ausloggen" msgstr "" @@ -832,22 +876,22 @@ msgid "Zusammenfassung der Fragebogenbestellung für %(veranstaltung)s" msgstr "" #: templates/formtools/wizard/email_zusammenfassung.html:70 -#: templates/veranstalter/dashboard.html:106 +#: templates/veranstalter/dashboard.html:109 msgid "Num" msgstr "" #: templates/formtools/wizard/email_zusammenfassung.html:71 -#: templates/veranstalter/dashboard.html:107 +#: templates/veranstalter/dashboard.html:110 msgid "Vorname" msgstr "" #: templates/formtools/wizard/email_zusammenfassung.html:72 -#: templates/veranstalter/dashboard.html:108 +#: templates/veranstalter/dashboard.html:111 msgid "Nachname" msgstr "" #: templates/formtools/wizard/email_zusammenfassung.html:73 -#: templates/veranstalter/dashboard.html:109 +#: templates/veranstalter/dashboard.html:112 msgid "Email" msgstr "" @@ -1666,32 +1710,153 @@ msgstr "" msgid "Anmelden" msgstr "" +#: templates/socialaccount/authentication_error.html:5 +#: templates/socialaccount/authentication_error.html:9 +msgid "Third-Party Login Failure" +msgstr "Fehlgeschlagene Anmeldung bei Drittanbietern" + +#: templates/socialaccount/authentication_error.html:12 +msgid "" +"An error occurred while attempting to login via your third-party account." +msgstr "" +"Beim Versuch, sich über Ihr Drittanbieterkonto anzumelden, ist ein Fehler aufgetreten." + +#: templates/socialaccount/connections.html:13 +msgid "" +"You can sign in to your account using any of the following third-party " +"accounts:" +msgstr "" +"Sie können sich mit einem der folgenden Drittanbieterkonten bei Ihrem Konto anmelden:" + +#: templates/socialaccount/connections.html:40 +msgid "Remove" +msgstr "Löschen" + +#: templates/socialaccount/connections.html:46 +msgid "You currently have no third-party accounts connected to this account." +msgstr "Sie haben derzeit keine Konten von Dritten, die mit diesem Konto verbunden sind." + +#: templates/socialaccount/connections.html:50 +msgid "Add a Third-Party Account" +msgstr "Ein Drittanbieterkonto hinzufügen" + +#: templates/socialaccount/email/account_connected_message.txt:4 +#, python-format +msgid "" +"A third-party account from %(provider)s has been connected to your account." +msgstr "Ein Drittanbieterkonto von %(provider)s wurde mit Ihrem Konto verbunden." + +#: templates/socialaccount/email/account_connected_subject.txt:3 +msgid "Third-Party Account Connected" +msgstr "Drittanbieterkonto verbunden" + +#: templates/socialaccount/email/account_disconnected_message.txt:4 +#, python-format +msgid "" +"A third-party account from %(provider)s has been disconnected from your " +"account." +msgstr "Ein Drittanbieterkonto von %(provider)s wurde von Ihrem Konto getrennt." + +#: templates/socialaccount/email/account_disconnected_subject.txt:3 +msgid "Third-Party Account Disconnected" +msgstr "Drittanbieterkonto wurde getrennt" + +#: templates/socialaccount/login.html:10 +#, python-format +msgid "Connect %(provider)s" +msgstr "Verbinden %(provider)s" + +#: templates/socialaccount/login.html:13 +#, python-format +msgid "You are about to connect a new third-party account from %(provider)s." +msgstr "Sie sind dabei, ein neues Drittanbieterkonto von %(provider)s zu verbinden." + +#: templates/socialaccount/login.html:17 +#, python-format +msgid "Sign In Via %(provider)s" +msgstr "Anmeldung über %(provider)s" + +#: templates/socialaccount/login.html:20 +#, python-format +msgid "You are about to sign in using a third-party account from %(provider)s." +msgstr "Sie sind dabei, ein neues Drittanbieterkonto von %(provider)s zu verbinden." + +#: templates/socialaccount/login.html:27 +#: templates/socialaccount/login_redirect.html:10 +msgid "Continue" +msgstr "Weiter" + +#: templates/socialaccount/login_cancelled.html:5 +#: templates/socialaccount/login_cancelled.html:9 +msgid "Login Cancelled" +msgstr "Anmeldung abgebrochen" + +#: templates/socialaccount/login_cancelled.html:13 +#, python-format +msgid "" +"You decided to cancel logging in to our site using one of your existing " +"accounts. If this was a mistake, please proceed to sign in." +msgstr "" +"Sie haben sich entschieden, die Anmeldung auf unserer Website mit einem " +"Ihrer bestehenden Konten abzubrechen. Wenn dies ein Fehler war, fahren Sie " +"bitte mit Einloggen fort." + +#: templates/socialaccount/messages/account_connected.txt:2 +msgid "The third-party account has been connected." +msgstr "Das Drittanbieterkonto wurde verbunden." + +#: templates/socialaccount/messages/account_connected_other.txt:2 +msgid "The third-party account is already connected to a different account." +msgstr "Das Drittanbieterkonto ist bereits mit einem anderen Konto verbunden." + +#: templates/socialaccount/messages/account_disconnected.txt:2 +msgid "The third-party account has been disconnected." +msgstr "Das Drittanbieterkonto wurde getrennt." + +#: templates/socialaccount/signup.html:5 +msgid "Signup" +msgstr "Registrieren" + +#: templates/socialaccount/signup.html:12 +#, python-format +msgid "" +"You are about to use your %(provider_name)s account to login to\n" +"%(site_name)s. As a final step, please complete the following form:" +msgstr "" +"Sie sind dabei, sich mit Ihrem %(provider_name)s-Konto bei %(site_name)s\n " +"anzumelden. Als letzten Schritt füllen Sie bitte das folgende Formular aus:" + +#: templates/socialaccount/snippets/login.html:10 +msgid "Or use a third-party" +msgstr "Oder verwenden Sie einen Dritten" + #: templates/veranstalter/dashboard.html:62 msgid "Dashboard" msgstr "" -#: templates/veranstalter/dashboard.html:67 -#: templates/veranstalter/dashboard.html:74 +#: templates/veranstalter/dashboard.html:70 +#: templates/veranstalter/dashboard.html:77 msgid "Status" msgstr "" -#: templates/veranstalter/dashboard.html:70 +#: templates/veranstalter/dashboard.html:73 msgid "Log" msgstr "" -#: templates/veranstalter/dashboard.html:73 +#: templates/veranstalter/dashboard.html:76 msgid "Datum" msgstr "" -#: templates/veranstalter/dashboard.html:86 +#: templates/veranstalter/dashboard.html:89 msgid "Aktuelle Bestellung" msgstr "" -#: templates/veranstalter/dashboard.html:88 +#: templates/veranstalter/dashboard.html:91 msgid "Bestellung ändern" msgstr "" -#: templates/veranstalter/dashboard.html:129 +#: templates/veranstalter/dashboard.html:132 msgid "Bestellung durchführen" msgstr "" diff --git a/src/locale/en/LC_MESSAGES/django.po b/src/locale/en/LC_MESSAGES/django.po index e72452e..4d64863 100644 --- a/src/locale/en/LC_MESSAGES/django.po +++ b/src/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-22 11:24+0100\n" +"POT-Creation-Date: 2025-01-20 17:24+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -497,7 +497,7 @@ msgstr "" #: feedback/models/base.py:717 #: templates/formtools/wizard/email_zusammenfassung.html:74 -#: templates/veranstalter/dashboard.html:110 +#: templates/veranstalter/dashboard.html:113 msgid "Anmerkung" msgstr "Note" @@ -508,7 +508,7 @@ msgstr "" #: feedback/models/base.py:729 #: templates/formtools/wizard/email_zusammenfassung.html:66 #: templates/formtools/wizard/zusammenfassung.html:61 -#: templates/veranstalter/dashboard.html:102 +#: templates/veranstalter/dashboard.html:105 msgid "Tutoren" msgstr "Tutors" @@ -552,17 +552,17 @@ msgstr "Publish" msgid "Evaluation" msgstr "Evaluation" -#: feedback/views/veranstalter.py:93 templates/feedback/person_form.html:19 +#: feedback/views/veranstalter.py:93 templates/feedback/person_form.html:21 #: templates/veranstalter/index.html:36 templates/veranstalter/index.html:43 msgid "Basisdaten" msgstr "Basic data" -#: feedback/views/veranstalter.py:95 templates/feedback/person_form.html:21 +#: feedback/views/veranstalter.py:95 templates/feedback/person_form.html:23 #: templates/veranstalter/index.html:38 msgid "Freie Fragen" msgstr "Free questions" -#: feedback/views/veranstalter.py:97 templates/feedback/person_form.html:23 +#: feedback/views/veranstalter.py:97 templates/feedback/person_form.html:25 #: templates/veranstalter/index.html:40 msgid "Zusammenfassung" msgstr "Summary" @@ -582,11 +582,11 @@ msgstr "Evaluation of courses - summary of data for {name}" msgid "Nachfolgend finder Sie Informationen zu Ihrer Bestellung" msgstr "Below you will find information about your order" -#: settings.py:45 +#: settings.py:48 msgid "German" msgstr "German" -#: settings.py:46 +#: settings.py:49 msgid "English" msgstr "English" @@ -657,6 +657,50 @@ msgstr "Accept" msgid "Es wird der Status für folgende Veranstaltungen geändert:" msgstr "The status of the following courses will be changed:" +#: templates/allauth/layouts/base.html:19 +msgid "Messages:" +msgstr "" + +#: templates/allauth/layouts/base.html:26 +msgid "Menu:" +msgstr "" + +#: templates/allauth/layouts/base.html:32 +msgid "Change Email" +msgstr "" + +#: templates/allauth/layouts/base.html:38 +msgid "Change Password" +msgstr "" + +#: templates/allauth/layouts/base.html:44 +#: templates/socialaccount/connections.html:5 +#: templates/socialaccount/connections.html:9 +msgid "Account Connections" +msgstr "" + +#: templates/allauth/layouts/base.html:50 +msgid "Two-Factor Authentication" +msgstr "" + +#: templates/allauth/layouts/base.html:56 +msgid "Sessions" +msgstr "" + +#: templates/allauth/layouts/base.html:62 +msgid "Sign Out" +msgstr "" + +#: templates/allauth/layouts/base.html:69 templates/socialaccount/login.html:5 +#: templates/socialaccount/login_redirect.html:5 +msgid "Sign In" +msgstr "" + +#: templates/allauth/layouts/base.html:75 templates/socialaccount/signup.html:9 +#: templates/socialaccount/signup.html:25 +msgid "Sign Up" +msgstr "" + #: templates/bestellung_base.html:10 msgid "zurück zum internen Bereich" msgstr "back to the internal area" @@ -759,39 +803,39 @@ msgstr "logged in for " msgid "%(veranstaltung.name)s (%(veranstaltung.semester.short)s)" msgstr "" -#: templates/feedback/person_form.html:12 +#: templates/feedback/person_form.html:13 #: templates/formtools/wizard/base.html:74 templates/veranstalter/index.html:15 msgid "ausloggen" msgstr "logout" -#: templates/feedback/person_form.html:16 +#: templates/feedback/person_form.html:18 msgid "Fragebogenbestellung Schritt 2 von 5" msgstr "Ordering a questionnaire Step 2 of 5" -#: templates/feedback/person_form.html:17 templates/intern/index.html:30 +#: templates/feedback/person_form.html:19 templates/intern/index.html:30 #: templates/veranstalter/index.html:33 msgid "Ablauf" msgstr "Procedure" -#: templates/feedback/person_form.html:20 -#: templates/feedback/person_form.html:25 templates/veranstalter/index.html:37 +#: templates/feedback/person_form.html:22 +#: templates/feedback/person_form.html:27 templates/veranstalter/index.html:37 msgid "Datenüberprüfung" msgstr "Data verification" -#: templates/feedback/person_form.html:22 templates/veranstalter/index.html:39 +#: templates/feedback/person_form.html:24 templates/veranstalter/index.html:39 msgid "Details zur Übung" msgstr "Exercise details" -#: templates/feedback/person_form.html:27 +#: templates/feedback/person_form.html:29 msgid "Bitte überprüfen Sie jetzt die Daten des Verantwortlichen " msgstr "Please check the data of the person responsible now " -#: templates/feedback/person_form.html:27 +#: templates/feedback/person_form.html:29 #, python-format msgid "%(veranstaltung.verantwortlich)s" msgstr "" -#: templates/feedback/person_form.html:30 +#: templates/feedback/person_form.html:32 msgid "weiter" msgstr "continue" @@ -803,15 +847,15 @@ msgstr "Recording the data of the person responsible:" msgid "Bestellprozess " msgstr "Order process " -#: templates/formtools/wizard/base.html:79 +#: templates/formtools/wizard/base.html:80 msgid "Bestellung für " msgstr "Order for " -#: templates/formtools/wizard/base.html:106 +#: templates/formtools/wizard/base.html:107 msgid "Pflichtfeld" msgstr "Required field" -#: templates/formtools/wizard/base.html:108 +#: templates/formtools/wizard/base.html:109 #: templates/intern/import_vv_edit_users_update.html:26 #: templates/intern/import_vv_edit_users_update.html:29 #: templates/intern/tans/process_tans.html:21 @@ -819,14 +863,14 @@ msgstr "Required field" msgid "Zurück" msgstr "Back" -#: templates/formtools/wizard/base.html:112 +#: templates/formtools/wizard/base.html:113 #: templates/intern/import_vv_edit.html:87 #: templates/intern/tans/process_tans.html:23 #: templates/veranstalter/index.html:75 msgid "Weiter" msgstr "Continue" -#: templates/formtools/wizard/base.html:116 +#: templates/formtools/wizard/base.html:117 #: templates/veranstalter/index.html:102 msgid "Speichern" msgstr "Save" @@ -849,8 +893,8 @@ msgstr "Responses" msgid "Die Bestellung wurde entgegengenommen" msgstr "The order has been accepted" -#: templates/formtools/wizard/bestellung_done.html:7 -#: templates/intern/index.html:16 templates/veranstalter/dashboard.html:65 +#: templates/formtools/wizard/bestellung_done.html:9 +#: templates/intern/index.html:19 templates/veranstalter/dashboard.html:67 msgid "Ausloggen" msgstr "Log out" @@ -864,22 +908,22 @@ msgid "Zusammenfassung der Fragebogenbestellung für %(veranstaltung)s" msgstr "Summary of the questionnaire order for %(veranstaltung)s" #: templates/formtools/wizard/email_zusammenfassung.html:70 -#: templates/veranstalter/dashboard.html:106 +#: templates/veranstalter/dashboard.html:109 msgid "Num" msgstr "" #: templates/formtools/wizard/email_zusammenfassung.html:71 -#: templates/veranstalter/dashboard.html:107 +#: templates/veranstalter/dashboard.html:110 msgid "Vorname" msgstr "First name" #: templates/formtools/wizard/email_zusammenfassung.html:72 -#: templates/veranstalter/dashboard.html:108 +#: templates/veranstalter/dashboard.html:111 msgid "Nachname" msgstr "Last name" #: templates/formtools/wizard/email_zusammenfassung.html:73 -#: templates/veranstalter/dashboard.html:109 +#: templates/veranstalter/dashboard.html:112 msgid "Email" msgstr "" @@ -1814,32 +1858,146 @@ msgstr "" msgid "Anmelden" msgstr "Login" +#: templates/socialaccount/authentication_error.html:5 +#: templates/socialaccount/authentication_error.html:9 +msgid "Third-Party Login Failure" +msgstr "" + +#: templates/socialaccount/authentication_error.html:12 +msgid "" +"An error occurred while attempting to login via your third-party account." +msgstr "" + +#: templates/socialaccount/connections.html:13 +msgid "" +"You can sign in to your account using any of the following third-party " +"accounts:" +msgstr "" + +#: templates/socialaccount/connections.html:40 +msgid "Remove" +msgstr "" + +#: templates/socialaccount/connections.html:46 +msgid "You currently have no third-party accounts connected to this account." +msgstr "" + +#: templates/socialaccount/connections.html:50 +msgid "Add a Third-Party Account" +msgstr "" + +#: templates/socialaccount/email/account_connected_message.txt:4 +#, python-format +msgid "" +"A third-party account from %(provider)s has been connected to your account." +msgstr "" + +#: templates/socialaccount/email/account_connected_subject.txt:3 +msgid "Third-Party Account Connected" +msgstr "" + +#: templates/socialaccount/email/account_disconnected_message.txt:4 +#, python-format +msgid "" +"A third-party account from %(provider)s has been disconnected from your " +"account." +msgstr "" + +#: templates/socialaccount/email/account_disconnected_subject.txt:3 +msgid "Third-Party Account Disconnected" +msgstr "" + +#: templates/socialaccount/login.html:10 +#, python-format +msgid "Connect %(provider)s" +msgstr "" + +#: templates/socialaccount/login.html:13 +#, python-format +msgid "You are about to connect a new third-party account from %(provider)s." +msgstr "" + +#: templates/socialaccount/login.html:17 +#, python-format +msgid "Sign In Via %(provider)s" +msgstr "" + +#: templates/socialaccount/login.html:20 +#, python-format +msgid "You are about to sign in using a third-party account from %(provider)s." +msgstr "" + +#: templates/socialaccount/login.html:27 +#: templates/socialaccount/login_redirect.html:10 +msgid "Continue" +msgstr "" + +#: templates/socialaccount/login_cancelled.html:5 +#: templates/socialaccount/login_cancelled.html:9 +msgid "Login Cancelled" +msgstr "" + +#: templates/socialaccount/login_cancelled.html:13 +#, python-format +msgid "" +"You decided to cancel logging in to our site using one of your existing " +"accounts. If this was a mistake, please proceed to sign in." +msgstr "" + +#: templates/socialaccount/messages/account_connected.txt:2 +msgid "The third-party account has been connected." +msgstr "" + +#: templates/socialaccount/messages/account_connected_other.txt:2 +msgid "The third-party account is already connected to a different account." +msgstr "" + +#: templates/socialaccount/messages/account_disconnected.txt:2 +msgid "The third-party account has been disconnected." +msgstr "" + +#: templates/socialaccount/signup.html:5 +msgid "Signup" +msgstr "" + +#: templates/socialaccount/signup.html:12 +#, python-format +msgid "" +"You are about to use your %(provider_name)s account to login to\n" +"%(site_name)s. As a final step, please complete the following form:" +msgstr "" + +#: templates/socialaccount/snippets/login.html:10 +msgid "Or use a third-party" +msgstr "" + #: templates/veranstalter/dashboard.html:62 msgid "Dashboard" msgstr "" -#: templates/veranstalter/dashboard.html:67 -#: templates/veranstalter/dashboard.html:74 +#: templates/veranstalter/dashboard.html:70 +#: templates/veranstalter/dashboard.html:77 msgid "Status" msgstr "" -#: templates/veranstalter/dashboard.html:70 +#: templates/veranstalter/dashboard.html:73 msgid "Log" msgstr "" -#: templates/veranstalter/dashboard.html:73 +#: templates/veranstalter/dashboard.html:76 msgid "Datum" msgstr "Date" -#: templates/veranstalter/dashboard.html:86 +#: templates/veranstalter/dashboard.html:89 msgid "Aktuelle Bestellung" msgstr "Current order" -#: templates/veranstalter/dashboard.html:88 +#: templates/veranstalter/dashboard.html:91 msgid "Bestellung ändern" msgstr "Change order" -#: templates/veranstalter/dashboard.html:129 +#: templates/veranstalter/dashboard.html:132 msgid "Bestellung durchführen" msgstr "Execute order" diff --git a/src/urls.py b/src/urls.py index 687e0df..7b917a7 100644 --- a/src/urls.py +++ b/src/urls.py @@ -19,9 +19,9 @@ admin.autodiscover() admin.site.login = secure_admin_login(admin.site.login) -urlpatterns = [ +urlpatterns = i18n_patterns( path('accounts/', include('allauth.urls')), -] +) urlpatterns += [ re_path(r'^$', RedirectView.as_view(url=reverse_lazy("feedback:default"), permanent=True), name='no-path'), From 70a655f2f49cf11c241080f01948a8af37ca231b Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Wed, 22 Jan 2025 23:40:14 +0100 Subject: [PATCH 6/8] added test --- src/feedback/tests/test_views_intern_auth.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/feedback/tests/test_views_intern_auth.py b/src/feedback/tests/test_views_intern_auth.py index 2ff589e..bafe6b7 100644 --- a/src/feedback/tests/test_views_intern_auth.py +++ b/src/feedback/tests/test_views_intern_auth.py @@ -37,6 +37,20 @@ def test_login_debug_auth(self): self.assertEqual(response.status_code, 302) self.assertEqual(response['Location'], tests.INDEX_URL) + @override_settings(DEBUG=False) + def test_login_auth(self) : + account_login_url = reverse('account_login') + + response = self.client.get(tests.LOGIN_URL) + + self.assertEqual(response.status_code, 302) + self.assertTrue(response['Location'].endswith(account_login_url)) + + response = self.client.get(account_login_url) + + self.assertEqual(response.status_code, 200) + self.assertTemplateUsed(response, 'socialaccount/snippets/login.html') + def test_auth_user(self) : response = self.client.get(tests.AUTH_URL) self.assertEqual(response.status_code, 200) From 6f0818dd4f0bad824ac681bc90a2cb53f1be1783 Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:20:00 +0100 Subject: [PATCH 7/8] moved SOCIALACCOUNT_PROVIDERS to settings_production.py --- src/settings.py | 17 ----------------- src/settings_production.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/settings.py b/src/settings.py index 59f7d88..d814097 100644 --- a/src/settings.py +++ b/src/settings.py @@ -170,28 +170,11 @@ ACCOUNT_LOGOUT_REDIRECT_URL ='/accounts/login/' - SOCIALACCOUNT_ADAPTER = 'feedback.auth_adapter.FeedbackSocialAccountAdapter' SOCIALACCOUNT_ONLY = True ACCOUNT_EMAIL_VERIFICATION = 'none' -SOCIALACCOUNT_PROVIDERS = { - "openid_connect": { - "APPS": [ - { - "provider_id": "keycloak", - "name": "Keycloak", - "client_id": "", - "secret": "", - "settings": { - "server_url": "", - }, - } - ] - } -} - # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False. diff --git a/src/settings_production.py b/src/settings_production.py index 211e03f..53dda74 100644 --- a/src/settings_production.py +++ b/src/settings_production.py @@ -11,8 +11,25 @@ URL_PREFIX = 'feedback/' LOGIN_URL = '/' + URL_PREFIX[:-1] + LOGIN_URL LOGIN_REDIRECT_URL = '/' + URL_PREFIX[:-1] + LOGIN_REDIRECT_URL +ACCOUNT_LOGOUT_REDIRECT_URL = '/' + URL_PREFIX[:-1] + ACCOUNT_LOGOUT_REDIRECT_URL SESSION_COOKIE_SECURE = True +SOCIALACCOUNT_PROVIDERS = { + "openid_connect": { + "APPS": [ + { + "provider_id": "keycloak", + "name": "Keycloak", + "client_id": secrets.KEYCLOACK_CLIENT_ID, + "secret": secrets.KEYCLOACK_SECRET, + "settings": { + "server_url": secrets.KEYCLOACK_SERVER_URL, + }, + } + ] + } +} + # @see https://docs.djangoproject.com/es/1.9/topics/email/ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' From b824dea74e0d640ab8a3a539d8ad38202a507589 Mon Sep 17 00:00:00 2001 From: 4-dash <120916864+4-dash@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:41:01 +0100 Subject: [PATCH 8/8] typo fix --- src/settings_production.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/settings_production.py b/src/settings_production.py index 53dda74..ba6f04e 100644 --- a/src/settings_production.py +++ b/src/settings_production.py @@ -20,10 +20,10 @@ { "provider_id": "keycloak", "name": "Keycloak", - "client_id": secrets.KEYCLOACK_CLIENT_ID, - "secret": secrets.KEYCLOACK_SECRET, + "client_id": secrets.KEYCLOAK_CLIENT_ID, + "secret": secrets.KEYCLOAK_SECRET, "settings": { - "server_url": secrets.KEYCLOACK_SERVER_URL, + "server_url": secrets.KEYCLOAK_SERVER_URL, }, } ]