changeset 5258:04798ed1e1a7

AuthSettingsController: rename dictionary key for consistency Rename 'auth_plugins_shortnames' to 'plugin_shortnames' for consistency with 'plugin_settings', and to emphasize that it's not one of the values retrieved from the database using get_auth_settings (all of which start with 'auth_').
author Søren Løvborg <kwi@kwi.dk>
date Tue, 14 Jul 2015 13:59:59 +0200
parents a45113998d07
children 79edea9d56dc
files kallithea/controllers/admin/auth_settings.py kallithea/templates/admin/auth/auth_settings.html
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
@@ -67,13 +67,13 @@
         formglobals = {}
         formglobals.update(Setting.get_auth_settings())
         formglobals["plugin_settings"] = {}
-        formglobals["auth_plugins_shortnames"] = {}
+        formglobals["plugin_shortnames"] = {}
         _defaults["auth_plugins"] = formglobals["auth_plugins"]
 
         for module in formglobals["auth_plugins"]:
             plugin = auth_modules.loadplugin(module)
             plugin_name = plugin.name
-            formglobals["auth_plugins_shortnames"][module] = plugin_name
+            formglobals["plugin_shortnames"][module] = plugin_name
             formglobals["plugin_settings"][module] = plugin.plugin_settings()
             for v in formglobals["plugin_settings"][module]:
                 fullname = ("auth_" + plugin_name + "_" + v["name"])
--- 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
@@ -47,7 +47,7 @@
     </div>
 
     %for cnt, module in enumerate(c.auth_plugins):
-        <% pluginName = c.auth_plugins_shortnames[module] %>
+        <% pluginName = c.plugin_shortnames[module] %>
         <h1>${_('Plugin')}: ${pluginName}</h1>
         <div class="fields">
         ## autoform generation, based on plugin definition from it's settings