Mercurial > kallithea
diff rhodecode/lib/auth.py @ 1135:1aa1655bf019 beta
fixed some config bool converter problems with ldap
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 15 Mar 2011 23:34:14 +0100 |
parents | 31e82d872631 |
children | 74251f8004d2 |
line wrap: on
line diff
--- a/rhodecode/lib/auth.py Mon Mar 14 01:34:08 2011 +0100 +++ b/rhodecode/lib/auth.py Tue Mar 15 23:34:14 2011 +0100 @@ -43,7 +43,7 @@ if __platform__ in ('Linux', 'Darwin'): import bcrypt - +from rhodecode.lib import str2bool from rhodecode.lib.exceptions import LdapPasswordError, LdapUsernameError from rhodecode.lib.utils import get_repo_slug from rhodecode.lib.auth_ldap import AuthLdap @@ -179,7 +179,7 @@ #====================================================================== # FALLBACK TO LDAP AUTH IF ENABLE #====================================================================== - if ldap_settings.get('ldap_active', False): + if str2bool(ldap_settings.get('ldap_active')): log.debug("Authenticating user using ldap") kwargs = { 'server':ldap_settings.get('ldap_host', ''), @@ -187,7 +187,7 @@ 'port':ldap_settings.get('ldap_port'), 'bind_dn':ldap_settings.get('ldap_dn_user'), 'bind_pass':ldap_settings.get('ldap_dn_pass'), - 'use_ldaps':ldap_settings.get('ldap_ldaps'), + 'use_ldaps':str2bool(ldap_settings.get('ldap_ldaps')), 'tls_reqcert':ldap_settings.get('ldap_tls_reqcert'), 'ldap_filter':ldap_settings.get('ldap_filter'), 'search_scope':ldap_settings.get('ldap_search_scope'),