Skip to content

Commit

Permalink
hide ban details
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Ilario <filario@redhat.com>
  • Loading branch information
filariow committed Aug 29, 2024
1 parent d7393c5 commit 6c12ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,12 @@ func (p *Proxy) ensureUserIsNotBanned() echo.MiddlewareFunc {
// retrieve banned users
uu, err := p.app.InformerService().ListBannedUsersByEmail(email)
if err != nil {
return crterrors.NewInternalError(errs.New("unable to retrieve user"), "could not define ban status")
return crterrors.NewInternalError(errs.New("could not define user access"), "could not define user access")
}

// if a matching Banned user is found, then user is banned
if len(uu) > 0 {
return crterrors.NewForbiddenError("user is banned", "user is banned")
return crterrors.NewForbiddenError("user access is forbidden", "user access is forbidden")
}

// user is not banned
Expand Down

0 comments on commit 6c12ec8

Please sign in to comment.