Skip to content
Snippets Groups Projects
Commit 274cebd3 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '521-revert-support-custom-authentication-backends-wasn-t-done-cleanly' into 'master'

Resolve "Revert "Support custom authentication backends" wasn't done cleanly"

Closes #521

See merge request !741
parents e2f32351 a562f8f0
No related branches found
No related tags found
1 merge request!741Resolve "Revert "Support custom authentication backends" wasn't done cleanly"
Pipeline #37899 failed
......@@ -16,6 +16,12 @@ Fixed
* Set a fixed version for django-sass-processor to avoid a bug with searching ``style.css`` in the wrong storage.
* Correct the z-index of the navbar to display the main title again on mobile devices.
Removed
~~~~~~~
* Leftovers from a functionality already dropped in the development process
(custom authentication backends and alternative login views).
`2.0rc6`_ - 2021-10-11
----------------------
......
......@@ -246,20 +246,6 @@ class SchoolNameOfficial(StringPreference):
verbose_name = _("Official name of the school, e.g. as given by supervisory authority")
@site_preferences_registry.register
class AuthenticationBackends(MultipleChoicePreference):
"""Authentication backends of your AlekSIS instance."""
section = auth
name = "backends"
default = None
verbose_name = _("Enabled custom authentication backends")
field_attribute = {"initial": []}
def get_choices(self):
return [(b, b) for b in settings.CUSTOM_AUTHENTICATION_BACKENDS]
@site_preferences_registry.register
class AllowPasswordChange(BooleanPreference):
section = auth
......
......@@ -438,9 +438,6 @@ if _settings.get("ldap.uri", None):
"is_superuser"
]
CUSTOM_AUTHENTICATION_BACKENDS = []
merge_app_settings("AUTHENTICATION_BACKENDS", CUSTOM_AUTHENTICATION_BACKENDS)
# Add ModelBckend last so all other backends get a chance
# to verify passwords first
AUTHENTICATION_BACKENDS.append("django.contrib.auth.backends.ModelBackend")
......@@ -448,10 +445,6 @@ AUTHENTICATION_BACKENDS.append("django.contrib.auth.backends.ModelBackend")
# Authentication backend for django-allauth.
AUTHENTICATION_BACKENDS.append("allauth.account.auth_backends.AuthenticationBackend")
# Structure of items: backend, URL name, icon name, button title
ALTERNATIVE_LOGIN_VIEWS = []
merge_app_settings("ALTERNATIVE_LOGIN_VIEWS", ALTERNATIVE_LOGIN_VIEWS, True)
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
......
......@@ -210,14 +210,6 @@ def custom_information_processor(request: HttpRequest) -> dict:
return {
"FOOTER_MENU": CustomMenu.get_default("footer"),
"ALTERNATIVE_LOGIN_VIEWS_LIST": [
a[0]
for a in settings.ALTERNATIVE_LOGIN_VIEWS
if a[0] in settings.AUTHENTICATION_BACKENDS
],
"ALTERNATIVE_LOGIN_VIEWS": [
a for a in settings.ALTERNATIVE_LOGIN_VIEWS if a[0] in settings.AUTHENTICATION_BACKENDS
],
"ADMINS": settings.ADMINS,
"PWA_ICONS": regrouped_pwa_icons,
}
......
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