mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Skip email domain check when admins edit user emails (#29609)
Follow #29522 Administrators should be able to set a user's email address even if the email address is not in `EMAIL_DOMAIN_ALLOWLIST`
This commit is contained in:
		| @@ -412,7 +412,7 @@ func EditUserPost(ctx *context.Context) { | ||||
| 	} | ||||
|  | ||||
| 	if form.Email != "" { | ||||
| 		if err := user_service.AddOrSetPrimaryEmailAddress(ctx, u, form.Email); err != nil { | ||||
| 		if err := user_service.AdminAddOrSetPrimaryEmailAddress(ctx, u, form.Email); err != nil { | ||||
| 			switch { | ||||
| 			case user_model.IsErrEmailCharIsNotSupported(err), user_model.IsErrEmailInvalid(err): | ||||
| 				ctx.Data["Err_Email"] = true | ||||
|   | ||||
		Reference in New Issue
	
	Block a user