summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-02-21 22:38:49 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-02-21 22:38:49 -0300
commit9d583557e4c4037a31e36b2a6186ecf806047a1c (patch)
treeda72fa35b992fa5e1bcccd1ad8bd5c36acbca825
parent03a3cd161bcf96dc9db4ebb7f00f26ebb2be99ba (diff)
downloadaskbot-9d583557e4c4037a31e36b2a6186ecf806047a1c.tar.gz
askbot-9d583557e4c4037a31e36b2a6186ecf806047a1c.tar.bz2
askbot-9d583557e4c4037a31e36b2a6186ecf806047a1c.zip
auto-enabled password login fields with LDAP on
-rw-r--r--askbot/conf/ldap.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/askbot/conf/ldap.py b/askbot/conf/ldap.py
index 7d384516..34b6ec87 100644
--- a/askbot/conf/ldap.py
+++ b/askbot/conf/ldap.py
@@ -10,12 +10,20 @@ LDAP_SETTINGS = livesettings.ConfigurationGroup(
super_group = EXTERNAL_SERVICES
)
+def enable_ldap_callback(current_value, new_value):
+ """enables local login form when ldap is on"""
+ if new_value == True:
+ settings.update('SIGNIN_LOCAL_ENABLED', True)
+
+ return new_value
+
settings.register(
livesettings.BooleanValue(
LDAP_SETTINGS,
'USE_LDAP_FOR_PASSWORD_LOGIN',
description=_('Use LDAP authentication for the password login'),
- defaut=False
+ defaut=False,
+ update_callback=enable_ldap_callback
)
)