mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-30 00:01:24 +00:00
use 403 instead of 401 for ErrUserProhibitLogin (#7591)
This commit is contained in:
parent
5e4e7d3df0
commit
c236ba35ca
|
@ -216,7 +216,7 @@ func HTTP(ctx *context.Context) {
|
|||
authUser, err = models.UserSignIn(authUsername, authPasswd)
|
||||
if err != nil {
|
||||
if models.IsErrUserProhibitLogin(err) {
|
||||
ctx.HandleText(http.StatusUnauthorized, "User is not permitted to login")
|
||||
ctx.HandleText(http.StatusForbidden, "User is not permitted to login")
|
||||
return
|
||||
} else if !models.IsErrUserNotExist(err) {
|
||||
ctx.ServerError("UserSignIn error: %v", err)
|
||||
|
|
Loading…
Reference in a new issue