##// END OF EJS Templates
auth: Fix renaming of 'auth_cahe_ttl' to 'cache_ttl' #4127
Martin Bornhold -
r503:82fa7f5f default
parent child Browse files
Show More
@@ -565,8 +565,8 b' def authenticate(username, password, env'
565 if isinstance(plugin.AUTH_CACHE_TTL, (int, long)):
565 if isinstance(plugin.AUTH_CACHE_TTL, (int, long)):
566 # plugin cache set inside is more important than the settings value
566 # plugin cache set inside is more important than the settings value
567 _cache_ttl = plugin.AUTH_CACHE_TTL
567 _cache_ttl = plugin.AUTH_CACHE_TTL
568 elif plugin_settings.get('auth_cache_ttl'):
568 elif plugin_settings.get('cache_ttl'):
569 _cache_ttl = safe_int(plugin_settings.get('auth_cache_ttl'), 0)
569 _cache_ttl = safe_int(plugin_settings.get('cache_ttl'), 0)
570
570
571 plugin_cache_active = bool(_cache_ttl and _cache_ttl > 0)
571 plugin_cache_active = bool(_cache_ttl and _cache_ttl > 0)
572
572
@@ -47,10 +47,10 b' class TestAuthSettingsController(object)'
47 for plugin in plugins_list.split(','):
47 for plugin in plugins_list.split(','):
48 plugin_name = plugin.partition('#')[-1]
48 plugin_name = plugin.partition('#')[-1]
49 enabled_plugin = '%s_enabled' % plugin_name
49 enabled_plugin = '%s_enabled' % plugin_name
50 cache_ttl = '%s_auth_cache_ttl' % plugin_name
50 cache_ttl = '%s_cache_ttl' % plugin_name
51
51
52 # default params that are needed for each plugin,
52 # default params that are needed for each plugin,
53 # `enabled` and `auth_cache_ttl`
53 # `enabled` and `cache_ttl`
54 params.update({
54 params.update({
55 enabled_plugin: True,
55 enabled_plugin: True,
56 cache_ttl: 0
56 cache_ttl: 0
@@ -97,7 +97,7 b' class TestAuthSettingsController(object)'
97 'attr_firstname': 'ima',
97 'attr_firstname': 'ima',
98 'attr_lastname': 'tester',
98 'attr_lastname': 'tester',
99 'attr_email': 'test@example.com',
99 'attr_email': 'test@example.com',
100 'auth_cache_ttl': '0',
100 'cache_ttl': '0',
101 })
101 })
102 if force:
102 if force:
103 params = {}
103 params = {}
@@ -190,7 +190,7 b' class TestAuthSettingsController(object)'
190 'attr_firstname': 'ima',
190 'attr_firstname': 'ima',
191 'attr_lastname': 'tester',
191 'attr_lastname': 'tester',
192 'attr_email': 'test@example.com',
192 'attr_email': 'test@example.com',
193 'auth_cache_ttl': '60',
193 'cache_ttl': '60',
194 'csrf_token': csrf_token,
194 'csrf_token': csrf_token,
195 }
195 }
196 )
196 )
@@ -217,10 +217,10 b' def enable_auth_plugins(request, pylonsa'
217 plugin = rhodecode.authentication.base.loadplugin(module)
217 plugin = rhodecode.authentication.base.loadplugin(module)
218 plugin_name = plugin.name
218 plugin_name = plugin.name
219 enabled_plugin = 'auth_%s_enabled' % plugin_name
219 enabled_plugin = 'auth_%s_enabled' % plugin_name
220 cache_ttl = 'auth_%s_auth_cache_ttl' % plugin_name
220 cache_ttl = 'auth_%s_cache_ttl' % plugin_name
221
221
222 # default params that are needed for each plugin,
222 # default params that are needed for each plugin,
223 # `enabled` and `auth_cache_ttl`
223 # `enabled` and `cache_ttl`
224 params.update({
224 params.update({
225 enabled_plugin: True,
225 enabled_plugin: True,
226 cache_ttl: 0
226 cache_ttl: 0
General Comments 0
You need to be logged in to leave comments. Login now