# HG changeset patch
# User Marcin Kuzminski <marcin@python-works.com>
# Date 2011-03-17 19:41:16
# Node ID cf5761b37af96ae5a205a788e6f6006b4292b5ff
# Parent  dbdf19bf8689753a72ca49d1f622a203d5636bb2

fixed ldap settings

diff --git a/rhodecode/model/settings.py b/rhodecode/model/settings.py
--- a/rhodecode/model/settings.py
+++ b/rhodecode/model/settings.py
@@ -95,8 +95,11 @@ class SettingsModel(BaseModel):
 
         for row in r:
             v = row.app_settings_value
-            if v in ['0', '1']:
-                v = v == '1'
+            if v in ['true', 'yes', 'on', 'y', 't', '1']:
+                v = True
+            elif v in ['false', 'no', 'off', 'n', 'f', '0']:
+                v = False
+
             fd.update({row.app_settings_name:v})
 
         return fd