Require view permission for the project events history query - #32
Merged
Conversation
The handler answering the project-events pull query implemented the plain CommandHandler type, so any logged-in user could fetch the full change history of any project just by supplying its id. The WebSocket subscribe path already required the ViewProject capability; the pull path now goes through AuthorizedCommandHandler with the same capability on the same project resource, so the two paths cannot disagree. A null project id is rejected as a bad request instead of blowing up inside the authorization wrapper, and a contract test pins the resource and capability so a refactor cannot silently drop the check. The webprotege-authorization dependency is pinned to 2.0.1 directly: Maven mediation previously resolved 0.9.3 (via backend-api), which lacks the Capability classes the authorized handler needs. The unused BuiltInAction enum was built on 0.9.3's removed ActionId API and is deleted with the bump. Fixes the service half of protegeproject/webprotege-gwt-ui#295 (part of protegeproject/webprotege-gwt-ui#303).
This was referenced Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The service half of protegeproject/webprotege-gwt-ui#295 (part of protegeproject/webprotege-gwt-ui#303).
The pull-path handler implemented the plain
CommandHandlertype, so any logged-in user could fetch the full change history of any project by supplying its id. It now implementsAuthorizedCommandHandlerrequiring theViewProjectcapability on the project resource — the same check the WebSocket subscribe path performs, so the two paths cannot disagree. A null project id is rejected as a bad request, and a contract test pins the resource + capability.Notes for review:
webprotege-authorizationis pinned to 2.0.1 directly: Maven mediation resolved 0.9.3 (via backend-api), which lacks theCapabilityclasses the authorized handler needs. Verified: backend-api references no authorization types, andProjectResourceis identical between versions.BuiltInActionenum was built on 0.9.3's removedActionIdAPI and is deleted with the bump (dead code, zero references).