## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%def name="title()"> ${_('Authentication Settings')} %if c.rhodecode_name: · ${c.rhodecode_name} %endif <%def name="breadcrumbs_links()"> ${h.link_to(_('Admin'),h.url('admin_home'))} » ${_('Authentication')} <%def name="page_nav()"> ${self.menu('admin')} <%def name="main()">
${self.breadcrumbs()}
${h.form(url('auth_settings'))}
## enabled auth plugins

${_('Authentication Plugins')}

${h.text("auth_plugins", class_='large')} ${_('Comma separated list of plugins. Order of plugins is also order in which RhodeCode will try to authenticate user')}
${_('Available built-in plugins')}
    %for plugin_path in c.available_plugins:
  • ${_('enabled') if plugin_path in c.enabled_plugins else _('disabled')}${plugin_path}
  • %endfor
${h.submit('save',_('Save'),class_="btn")}
%for cnt, module in enumerate(c.auth_plugins): <% pluginName = c.auth_plugins_shortnames[module] %>

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

## autoform generation, based on plugin definition from it's settings %for setting in c.plugin_settings[module]: <% fullsetting = "auth_%s_%s" % (pluginName, setting["name"]) %> <% displayname = (setting["formname"] if ("formname" in setting) else setting["name"]) %> %if setting["type"] == "password":
${h.password(fullsetting,class_='small')} ${setting["description"]}
%elif setting["type"] in ["string", "int"]:
${h.text(fullsetting,class_='small')} ${setting["description"]}
%elif setting["type"] == "bool":
${h.checkbox(fullsetting,True,class_='small')}
${setting["description"]}
%elif setting["type"] == "select":
${h.select(fullsetting,setting['values'][0],setting['values'],class_='small')} ${setting["description"]}
%else:
This field is of type ${setting['type']}, which cannot be displayed. Must be one of [string|int|bool|select].
${setting["description"]}
%endif %endfor
%endfor
${h.end_form()}