Skip to content

Commit

Permalink
added the fix in the correct place as the refactoring eliminated the …
Browse files Browse the repository at this point in the history
…files currently existing in release-5.3 branch
  • Loading branch information
andrei-tyk committed Dec 17, 2024
1 parent aa46a59 commit efda1dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1,931 deletions.
4 changes: 4 additions & 0 deletions gateway/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,10 @@ func (t *BaseMiddleware) ApplyPolicies(session *user.SessionState) error {
session.AccessRights = rights
}

if len(rights) == 0 && policyIDs != nil {
return errors.New("key has no valid policies to be applied")
}

return nil
}

Expand Down
Loading

0 comments on commit efda1dd

Please sign in to comment.