Return 401 instead of 403
This commit is contained in:
parent
b06eb277a4
commit
8b40e80750
|
@ -96,7 +96,7 @@ const authorized =
|
|||
}
|
||||
|
||||
if (!ctx.user) {
|
||||
return ctx.throw(403, "No user info found")
|
||||
return ctx.throw(401, "No user info found")
|
||||
}
|
||||
|
||||
// get the resource roles
|
||||
|
@ -148,7 +148,7 @@ const authorized =
|
|||
|
||||
// check authenticated
|
||||
if (!ctx.isAuthenticated) {
|
||||
return ctx.throw(403, "Session not authenticated")
|
||||
return ctx.throw(401, "Session not authenticated")
|
||||
}
|
||||
|
||||
// check general builder stuff, this middleware is a good way
|
||||
|
|
Loading…
Reference in New Issue