diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-27 18:06:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 18:06:38 +0800 |
commit | 7950f2d17d97c37fca22b88d48056de1c00b4d77 (patch) | |
tree | 962531de3ff86417dc06cc4ece6eb22176fb5b8c /templates | |
parent | cf3d55fa10f9b16d0ba996f8129f50743b2cd4ad (diff) |
conf: overhaul auth and user settings (#5942)
* conf: overhaul auth and user settings
* ci: update travis Go versions
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/config.tmpl | 71 |
1 files changed, 42 insertions, 29 deletions
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 0dc7786c..66aa158b 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -194,8 +194,6 @@ <dd>{{.Security.CookieUsername}}</dd> <dt>{{.i18n.Tr "admin.config.security.cookie_secure"}}</dt> <dd><i class="fa fa{{if .Security.CookieSecure}}-check{{end}}-square-o"></i></dd> - <dt>{{.i18n.Tr "admin.config.security.reverse_proxy_auth_user"}}</dt> - <dd>{{.Security.ReverseProxyAuthenticationUser}}</dd> <dt>{{.i18n.Tr "admin.config.security.enable_login_status_cookie"}}</dt> <dd><i class="fa fa{{if .Security.EnableLoginStatusCookie}}-check{{end}}-square-o"></i></dd> <dt>{{.i18n.Tr "admin.config.security.login_status_cookie_name"}}</dt> @@ -261,6 +259,48 @@ </dl> </div> + {{/* Authentication settings */}} + <h4 class="ui top attached header"> + {{.i18n.Tr "admin.config.auth_config"}} + </h4> + <div class="ui attached table segment"> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>{{.i18n.Tr "admin.config.auth.activate_code_lives"}}</dt> + <dd>{{.Auth.ActivateCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd> + <dt>{{.i18n.Tr "admin.config.auth.reset_password_code_lives"}}</dt> + <dd>{{.Auth.ResetPasswordCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd> + <dt>{{.i18n.Tr "admin.config.auth.require_email_confirm"}}</dt> + <dd><i class="fa fa{{if .Auth.RequireEmailConfirmation}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.auth.require_sign_in_view"}}</dt> + <dd><i class="fa fa{{if .Auth.RequireSigninView}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.auth.disable_registration"}}</dt> + <dd><i class="fa fa{{if .Auth.DisableRegistration}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.auth.enable_registration_captcha"}}</dt> + <dd><i class="fa fa{{if .Auth.EnableRegistrationCaptcha}}-check{{end}}-square-o"></i></dd> + + <div class="ui divider"></div> + + <dt>{{.i18n.Tr "admin.config.auth.enable_reverse_proxy_authentication"}}</dt> + <dd><i class="fa fa{{if .Auth.EnableReverseProxyAuthentication}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.auth.enable_reverse_proxy_auto_registration"}}</dt> + <dd><i class="fa fa{{if .Auth.EnableReverseProxyAutoRegistration}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.auth.reverse_proxy_authentication_header"}}</dt> + <dd><code>{{.Auth.ReverseProxyAuthenticationHeader}}</code></dd> + </dl> + </div> + + + {{/* User settings */}} + <h4 class="ui top attached header"> + {{.i18n.Tr "admin.config.user_config"}} + </h4> + <div class="ui attached table segment"> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>{{.i18n.Tr "admin.config.user.enable_email_notify"}}</dt> + <dd><i class="fa fa{{if .User.EnableEmailNotification}}-check{{end}}-square-o"></i></dd> + </dl> + </div> + <!-- HTTP Configuration --> <h4 class="ui top attached header"> {{.i18n.Tr "admin.config.http_config"}} @@ -279,33 +319,6 @@ </div> <h4 class="ui top attached header"> - {{.i18n.Tr "admin.config.service_config"}} - </h4> - <div class="ui attached table segment"> - <dl class="dl-horizontal admin-dl-horizontal"> - <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt> - <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd> - <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt> - <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd> - <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt> - <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd> - <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt> - <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd> - <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt> - <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd> - {{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt> - <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}} - <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt> - <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd> - <div class="ui divider"></div> - <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt> - <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd> - <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt> - <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd> - </dl> - </div> - - <h4 class="ui top attached header"> {{.i18n.Tr "admin.config.webhook_config"}} </h4> <div class="ui attached table segment"> |