mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	issue-2768: added new option allow_only_external_registration (#3910)
This commit is contained in:
		@@ -1143,6 +1143,7 @@ var Service struct {
 | 
			
		||||
	ResetPwdCodeLives                       int
 | 
			
		||||
	RegisterEmailConfirm                    bool
 | 
			
		||||
	DisableRegistration                     bool
 | 
			
		||||
	AllowOnlyExternalRegistration           bool
 | 
			
		||||
	ShowRegistrationButton                  bool
 | 
			
		||||
	RequireSignInView                       bool
 | 
			
		||||
	EnableNotifyMail                        bool
 | 
			
		||||
@@ -1168,7 +1169,8 @@ func newService() {
 | 
			
		||||
	Service.ActiveCodeLives = sec.Key("ACTIVE_CODE_LIVE_MINUTES").MustInt(180)
 | 
			
		||||
	Service.ResetPwdCodeLives = sec.Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180)
 | 
			
		||||
	Service.DisableRegistration = sec.Key("DISABLE_REGISTRATION").MustBool()
 | 
			
		||||
	Service.ShowRegistrationButton = sec.Key("SHOW_REGISTRATION_BUTTON").MustBool(!Service.DisableRegistration)
 | 
			
		||||
	Service.AllowOnlyExternalRegistration = sec.Key("ALLOW_ONLY_EXTERNAL_REGISTRATION").MustBool()
 | 
			
		||||
	Service.ShowRegistrationButton = sec.Key("SHOW_REGISTRATION_BUTTON").MustBool(!(Service.DisableRegistration || Service.AllowOnlyExternalRegistration))
 | 
			
		||||
	Service.RequireSignInView = sec.Key("REQUIRE_SIGNIN_VIEW").MustBool()
 | 
			
		||||
	Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
 | 
			
		||||
	Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user