diff --git a/mdcs/core_settings.py b/mdcs/core_settings.py index 3ec6909..32173dc 100644 --- a/mdcs/core_settings.py +++ b/mdcs/core_settings.py @@ -125,14 +125,6 @@ """ boolean: enable SAML2 SSO authentication. """ -ENABLE_2FA = os.getenv("ENABLE_2FA", "False").lower() == "true" -""" :py:class:`bool`: Enable 2 Factor Authentication login -""" - -ENABLE_2FA_EMAIL = os.getenv("ENABLE_2FA_EMAIL", "False").lower() == "true" -""" :py:class:`bool`: Enable 2 Factor Authentication login. Ignored if ENABLE_2FA is False. -""" - ENABLE_HANDLE_PID = os.getenv("ENABLE_HANDLE_PID", "False").lower() == "true" """ boolean: enable handle server PID support. """ diff --git a/mdcs/settings.py b/mdcs/settings.py index 174524a..d3df3f3 100644 --- a/mdcs/settings.py +++ b/mdcs/settings.py @@ -537,24 +537,4 @@ }, } -# Django two-factor auth -if ENABLE_2FA: # noqa: F405 (core setting) - LOGIN_URL = "two_factor:login" - LOGIN_REDIRECT_URL = "two_factor:profile" - - INSTALLED_APPS = INSTALLED_APPS + ( - "django_otp", - "django_otp.plugins.otp_static", - "django_otp.plugins.otp_totp", - "two_factor", - "two_factor.plugins.phonenumber", - ) - MIDDLEWARE = MIDDLEWARE + ("django_otp.middleware.OTPMiddleware",) - - if ENABLE_2FA_EMAIL: # noqa: F405 (core setting) - INSTALLED_APPS = INSTALLED_APPS + ( - "django_otp.plugins.otp_email", - "two_factor.plugins.email", - ) -else: - LOGIN_URL = "core_main_app_login" +LOGIN_URL = "core_main_app_login" diff --git a/templates/two_factor/_base.html b/templates/two_factor/_base.html deleted file mode 100644 index d7df973..0000000 --- a/templates/two_factor/_base.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "theme.html" %} - -{% block app_data %} - -{% block content %}{% endblock %} - -{% endblock %} \ No newline at end of file