fix: [CODE-2114]: Return 404 if anonymous makes user restricted call (#2225)

unified-ui
Johannes Batzill 2024-07-15 19:07:14 +00:00 committed by Harness
parent 7c2c732c9f
commit 7d5ac7b45c
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ func RestrictTo(pType enum.PrincipalType) func(http.Handler) http.Handler {
if p.UID == types.AnonymousPrincipalUID {
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
}