diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-20 20:44:50 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-20 20:44:50 -0400 |
commit | ea03d66c21d7158115cf4d05490ef7c78de7cf70 (patch) | |
tree | 7076952cca68cf27b4ffd33492890b1b29ea674d /askbot/deps | |
parent | c1c4ed1535ca1b8fe603c47eb1e94ec6fe0a6baa (diff) | |
download | askbot-ea03d66c21d7158115cf4d05490ef7c78de7cf70.tar.gz askbot-ea03d66c21d7158115cf4d05490ef7c78de7cf70.tar.bz2 askbot-ea03d66c21d7158115cf4d05490ef7c78de7cf70.zip |
fixed a bug in the login page where it was impossible to remove password login fields
Diffstat (limited to 'askbot/deps')
-rw-r--r-- | askbot/deps/django_authopenid/util.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/askbot/deps/django_authopenid/util.py b/askbot/deps/django_authopenid/util.py index 024dbf09..8c9e78da 100644 --- a/askbot/deps/django_authopenid/util.py +++ b/askbot/deps/django_authopenid/util.py @@ -160,19 +160,20 @@ def get_provider_name(openid_url): def use_password_login(): """password login is activated - either if USE_RECAPTCHA is false - of if recaptcha keys are set correctly + if any of the login methods requiring user name + and password are activated + + TODO: these should be mutually exclusive and + it should be possible to register another login + method using password and user name via configuration """ if askbot_settings.SIGNIN_WORDPRESS_SITE_ENABLED: return True - if askbot_settings.USE_RECAPTCHA: - if askbot_settings.RECAPTCHA_KEY and askbot_settings.RECAPTCHA_SECRET: - return True - else: - logging.critical('if USE_RECAPTCHA == True, set recaptcha keys!!!') - return False - else: + if askbot_settings.SIGNIN_LOCAL_ENABLED: + return True + if askbot_settings.USE_LDAP_FOR_PASSWORD_LOGIN: return True + return False def filter_enabled_providers(data): """deletes data about disabled providers from |