changeset 3973:7e9494f4c4bf

fixed issue with ldap disabling after initially enabling it
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 11 Jun 2013 14:28:05 +0200
parents 3cb5a35a319d
children 39798d53c65d
files rhodecode/controllers/admin/ldap_settings.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/admin/ldap_settings.py	Tue Jun 11 14:22:54 2013 +0200
+++ b/rhodecode/controllers/admin/ldap_settings.py	Tue Jun 11 14:28:05 2013 +0200
@@ -115,7 +115,7 @@
                 for k, v in form_result.items():
                     if k.startswith('ldap_'):
                         if k == 'ldap_active':
-                            v = ldap_active
+                            v = v if ldap_active else False
                         setting = RhodeCodeSetting.get_by_name(k)
                         setting.app_settings_value = v
                         Session().add(setting)
@@ -125,8 +125,8 @@
                         category='success')
                 if not ldap_active:
                     #if ldap is missing send an info to user
-                    h.flash(_('Unable to activate ldap. The "python-ldap" library '
-                              'is missing.'), category='warning')
+                    h.flash(_('Unable to activate ldap. The "python-ldap" '
+                              'library is missing.'), category='warning')
 
             except (DatabaseError,):
                 raise