Changeset - 04798ed1e1a7
[Not reviewed]
default
0 2 0
Søren Løvborg - 10 years ago 2015-07-14 13:59:59
kwi@kwi.dk
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_').
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/auth_settings.py
Show inline comments
 
@@ -67,13 +67,13 @@ class AuthSettingsController(BaseControl
 
        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"])
kallithea/templates/admin/auth/auth_settings.html
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)