Skip to content

Commit

Permalink
use 403 instead of 401 for ErrUserProhibitLogin (#7591)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored Jul 23, 2019
1 parent 5e4e7d3 commit c236ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/repo/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c236ba3

Please sign in to comment.