##// 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 565 if isinstance(plugin.AUTH_CACHE_TTL, (int, long)):
566 566 # plugin cache set inside is more important than the settings value
567 567 _cache_ttl = plugin.AUTH_CACHE_TTL
568 elif plugin_settings.get('auth_cache_ttl'):
569 _cache_ttl = safe_int(plugin_settings.get('auth_cache_ttl'), 0)
568 elif plugin_settings.get('cache_ttl'):
569 _cache_ttl = safe_int(plugin_settings.get('cache_ttl'), 0)
570 570
571 571 plugin_cache_active = bool(_cache_ttl and _cache_ttl > 0)
572 572
@@ -47,10 +47,10 b' class TestAuthSettingsController(object)'
47 47 for plugin in plugins_list.split(','):
48 48 plugin_name = plugin.partition('#')[-1]
49 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 52 # default params that are needed for each plugin,
53 # `enabled` and `auth_cache_ttl`
53 # `enabled` and `cache_ttl`
54 54 params.update({
55 55 enabled_plugin: True,
56 56 cache_ttl: 0
@@ -97,7 +97,7 b' class TestAuthSettingsController(object)'
97 97 'attr_firstname': 'ima',
98 98 'attr_lastname': 'tester',
99 99 'attr_email': 'test@example.com',
100 'auth_cache_ttl': '0',
100 'cache_ttl': '0',
101 101 })
102 102 if force:
103 103 params = {}
@@ -190,7 +190,7 b' class TestAuthSettingsController(object)'
190 190 'attr_firstname': 'ima',
191 191 'attr_lastname': 'tester',
192 192 'attr_email': 'test@example.com',
193 'auth_cache_ttl': '60',
193 'cache_ttl': '60',
194 194 'csrf_token': csrf_token,
195 195 }
196 196 )
@@ -217,10 +217,10 b' def enable_auth_plugins(request, pylonsa'
217 217 plugin = rhodecode.authentication.base.loadplugin(module)
218 218 plugin_name = plugin.name
219 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 222 # default params that are needed for each plugin,
223 # `enabled` and `auth_cache_ttl`
223 # `enabled` and `cache_ttl`
224 224 params.update({
225 225 enabled_plugin: True,
226 226 cache_ttl: 0
General Comments 0
You need to be logged in to leave comments. Login now