ldap: fixed regression in extracting settings after library updates.

- somehow we now got '' defaulted to None which changed the behaviour.
This commit is contained in:
Marcin Kuzminski 2017-11-11 16:43:45 +01:00
parent 7de15715e0
commit 7a512a4788
2 changed files with 5 additions and 2 deletions

View file

@ -218,7 +218,10 @@ class RhodeCodeAuthPluginBase(object):
else:
plugin_settings = SettingsModel().get_all_settings()
return plugin_settings.get(full_name) or default
if full_name in plugin_settings:
return plugin_settings[full_name]
else:
return default
def create_or_update_setting(self, name, value):
"""

View file

@ -195,7 +195,7 @@ class AuthLdap(object):
def __init__(self, server, base_dn, port=389, bind_dn='', bind_pass='',
tls_kind='PLAIN', tls_reqcert='DEMAND', ldap_version=3,
search_scope='SUBTREE', attr_login='uid',
ldap_filter=None):
ldap_filter=''):
if ldap == Missing:
raise LdapImportError("Missing or incompatible ldap library")