settings: Only include two-factor apps if two-factor auth is enabled.

This commit is contained in:
Tim Abbott
2017-11-29 09:49:12 -08:00
parent 954c363a2f
commit f9347962f6

View File

@@ -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