mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Allow only internal registration (#15795)
* Add ALLOW_ONLY_INTERNAL_REGISTRATION into settings * OpenID respect setting too
This commit is contained in:
@@ -149,6 +149,8 @@
|
||||
<dd>{{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||
<dd>{{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.allow_only_internal_registration"}}</dt>
|
||||
<dd>{{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.allow_only_external_registration"}}</dt>
|
||||
<dd>{{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
||||
|
@@ -3,10 +3,12 @@
|
||||
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
|
||||
<div class="new-menu-inner">
|
||||
<!-- TODO handle .ShowRegistrationButton once other login bugs are fixed -->
|
||||
<a class="item {{if not .user_exists}}active{{end}}"
|
||||
data-tab="auth-link-signup-tab">
|
||||
{{.i18n.Tr "auth.oauth_signup_tab"}}
|
||||
</a>
|
||||
{{if not .AllowOnlyInternalRegistration}}
|
||||
<a class="item {{if not .user_exists}}active{{end}}"
|
||||
data-tab="auth-link-signup-tab">
|
||||
{{.i18n.Tr "auth.oauth_signup_tab"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="item {{if .user_exists}}active{{end}}"
|
||||
data-tab="auth-link-signin-tab">
|
||||
{{.i18n.Tr "auth.oauth_signin_tab"}}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<a class="{{if .PageIsOpenIDConnect}}active{{end}} item" href="{{AppSubUrl}}/user/openid/connect">
|
||||
{{.i18n.Tr "auth.openid_connect_title"}}
|
||||
</a>
|
||||
{{if .EnableOpenIDSignUp}}
|
||||
{{if and .EnableOpenIDSignUp (not .AllowOnlyInternalRegistration)}}
|
||||
<a class="{{if .PageIsOpenIDRegister}}active{{end}} item" href="{{AppSubUrl}}/user/openid/register">
|
||||
{{.i18n.Tr "auth.openid_register_title"}}
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user