aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorZettat123 <zettat123@gmail.com>2024-03-06 00:51:56 +0800
committerGitHub <noreply@github.com>2024-03-05 16:51:56 +0000
commit136dd99e86eea9c8bfe61b972a12b395655171e8 (patch)
tree5987172b3e492eef0f5c3ab26ddae165d37f67dc /models
parentebff37ae09e99126668cbee5804d45f069a42081 (diff)
downloadgitea-136dd99e86eea9c8bfe61b972a12b395655171e8.tar.gz
gitea-136dd99e86eea9c8bfe61b972a12b395655171e8.zip
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`
Diffstat (limited to 'models')
-rw-r--r--models/user/email_address.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user/email_address.go b/models/user/email_address.go
index 3cb2e8268c..11700a0129 100644
--- a/models/user/email_address.go
+++ b/models/user/email_address.go
@@ -162,7 +162,7 @@ func ValidateEmail(email string) error {
return validateEmailDomain(email)
}
-// ValidateEmailForAdmin check if email is a valid address when admins manually add users
+// ValidateEmailForAdmin check if email is a valid address when admins manually add or edit users
func ValidateEmailForAdmin(email string) error {
return validateEmailBasic(email)
// In this case we do not need to check the email domain