# HG changeset patch # User Søren Løvborg # Date 1436875199 -7200 # Node ID 46011fe63e753c4689c850d64b966e05dcd58d45 # Parent a100a3af27f89f01637a938a1a75df9f270f103d AuthSettingsController: don't add auth settings to tmpl_context Do not import auth setting into the template context, since the values are not actually used, except for 'auth_plugins'. For 'auth_plugins', use the existing (and identical) 'enabled_plugins' attribute instead. diff -r a100a3af27f8 -r 46011fe63e75 kallithea/controllers/admin/auth_settings.py --- a/kallithea/controllers/admin/auth_settings.py Tue Jul 14 13:59:59 2015 +0200 +++ b/kallithea/controllers/admin/auth_settings.py Tue Jul 14 13:59:59 2015 +0200 @@ -63,15 +63,11 @@ def index(self, defaults=None, errors=None, prefix_error=False): self.__load_defaults() - # Import all auth settings into the template context. - for k, v in Setting.get_auth_settings().iteritems(): - setattr(c, k, v) - c.defaults = {} c.plugin_settings = {} c.plugin_shortnames = {} - for module in c.auth_plugins: + for module in c.enabled_plugins: plugin = auth_modules.loadplugin(module) plugin_name = plugin.name c.plugin_shortnames[module] = plugin_name @@ -85,7 +81,7 @@ if setting: c.defaults[fullname] = setting.app_settings_value # we want to show , separated list of enabled plugins - c.defaults['auth_plugins'] = ','.join(c.auth_plugins) + c.defaults['auth_plugins'] = ','.join(c.enabled_plugins) if defaults: c.defaults.update(defaults) diff -r a100a3af27f8 -r 46011fe63e75 kallithea/templates/admin/auth/auth_settings.html --- a/kallithea/templates/admin/auth/auth_settings.html Tue Jul 14 13:59:59 2015 +0200 +++ b/kallithea/templates/admin/auth/auth_settings.html Tue Jul 14 13:59:59 2015 +0200 @@ -46,7 +46,7 @@ - %for cnt, module in enumerate(c.auth_plugins): + %for cnt, module in enumerate(c.enabled_plugins): <% pluginName = c.plugin_shortnames[module] %>

${_('Plugin')}: ${pluginName}