mirror of https://github.com/harness/drone.git
fix: [CODE-2114]: Return 404 if anonymous makes user restricted call (#2225)
parent
7c2c732c9f
commit
7d5ac7b45c
|
@ -45,7 +45,8 @@ func RestrictTo(pType enum.PrincipalType) func(http.Handler) http.Handler {
|
||||||
if p.UID == types.AnonymousPrincipalUID {
|
if p.UID == types.AnonymousPrincipalUID {
|
||||||
log.Ctx(ctx).Debug().Msgf("Valid principal is required, received an Anonymous.")
|
log.Ctx(ctx).Debug().Msgf("Valid principal is required, received an Anonymous.")
|
||||||
|
|
||||||
render.Unauthorized(ctx, w)
|
// TODO: revert to Unauthorized once UI is handling it properly.
|
||||||
|
render.NotFound(ctx, w)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue