mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	Block registration based on email domain (#5157)
* implement email domain whitelist
This commit is contained in:
		
				
					committed by
					
						 techknowlogick
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							4c1f1f9646
						
					
				
				
					commit
					b97af15de6
				
			| @@ -1215,6 +1215,7 @@ var Service struct { | ||||
| 	ActiveCodeLives                         int | ||||
| 	ResetPwdCodeLives                       int | ||||
| 	RegisterEmailConfirm                    bool | ||||
| 	EmailDomainWhitelist                    []string | ||||
| 	DisableRegistration                     bool | ||||
| 	AllowOnlyExternalRegistration           bool | ||||
| 	ShowRegistrationButton                  bool | ||||
| @@ -1248,6 +1249,7 @@ func newService() { | ||||
| 	Service.ResetPwdCodeLives = sec.Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180) | ||||
| 	Service.DisableRegistration = sec.Key("DISABLE_REGISTRATION").MustBool() | ||||
| 	Service.AllowOnlyExternalRegistration = sec.Key("ALLOW_ONLY_EXTERNAL_REGISTRATION").MustBool() | ||||
| 	Service.EmailDomainWhitelist = sec.Key("EMAIL_DOMAIN_WHITELIST").Strings(",") | ||||
| 	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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user