Skip to content

Commit c236ba3

Browse files
authored
use 403 instead of 401 for ErrUserProhibitLogin (#7591)
1 parent 5e4e7d3 commit c236ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/repo/http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func HTTP(ctx *context.Context) {
216216
authUser, err = models.UserSignIn(authUsername, authPasswd)
217217
if err != nil {
218218
if models.IsErrUserProhibitLogin(err) {
219-
ctx.HandleText(http.StatusUnauthorized, "User is not permitted to login")
219+
ctx.HandleText(http.StatusForbidden, "User is not permitted to login")
220220
return
221221
} else if !models.IsErrUserNotExist(err) {
222222
ctx.ServerError("UserSignIn error: %v", err)

0 commit comments

Comments
 (0)