mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Skip email domain check when admin users adds user manually (#29522)
Fix #27457 Administrators should be able to manually create any user even if the user's email address is not in `EMAIL_DOMAIN_ALLOWLIST`.
This commit is contained in:
@ -133,7 +133,7 @@ func CreateUser(ctx *context.APIContext) {
|
||||
u.UpdatedUnix = u.CreatedUnix
|
||||
}
|
||||
|
||||
if err := user_model.CreateUser(ctx, u, overwriteDefault); err != nil {
|
||||
if err := user_model.AdminCreateUser(ctx, u, overwriteDefault); err != nil {
|
||||
if user_model.IsErrUserAlreadyExist(err) ||
|
||||
user_model.IsErrEmailAlreadyUsed(err) ||
|
||||
db.IsErrNameReserved(err) ||
|
||||
|
Reference in New Issue
Block a user