👔 Did not block unconfirmed user login, give them no permission instead

This commit is contained in:
2025-01-29 19:45:10 +08:00
parent 09010d5867
commit e115374589
2 changed files with 10 additions and 13 deletions

View File

@ -37,8 +37,6 @@ func doAuthenticate(c *fiber.Ctx) error {
user, err := services.LookupAccount(data.Username)
if err != nil {
return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("account was not found: %v", err.Error()))
} else if user.ConfirmedAt == nil {
return fiber.NewError(fiber.StatusForbidden, "account was not confirmed; check your inbox, there will be an email lead you confirm your registration")
} else if user.SuspendedAt != nil {
return fiber.NewError(fiber.StatusForbidden, "account was suspended")
}