From f9347962f6beb51fe9ab72d36a1c6628359b37bf Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 29 Nov 2017 09:49:12 -0800 Subject: [PATCH] settings: Only include two-factor apps if two-factor auth is enabled. --- zproject/settings.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zproject/settings.py b/zproject/settings.py index 7cf804187b..a377745fc9 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -483,13 +483,16 @@ INSTALLED_APPS = [ 'webpack_loader', 'zerver', 'social_django', - 'django_otp', - 'django_otp.plugins.otp_static', - 'django_otp.plugins.otp_totp', - 'two_factor', ] if USING_PGROONGA: INSTALLED_APPS += ['pgroonga'] +if TWO_FACTOR_AUTHENTICATION_ENABLED: + INSTALLED_APPS += [ + 'django_otp', + 'django_otp.plugins.otp_static', + 'django_otp.plugins.otp_totp', + 'two_factor', + ] INSTALLED_APPS += EXTRA_INSTALLED_APPS ZILENCER_ENABLED = 'zilencer' in INSTALLED_APPS