feat: implement GET /v3/posts/{postId} with visibility-aware access control - #1251
Open
ondraholis wants to merge 11 commits into
Open
feat: implement GET /v3/posts/{postId} with visibility-aware access control#1251ondraholis wants to merge 11 commits into
ondraholis wants to merge 11 commits into
Conversation
added 7 commits
July 31, 2026 12:08
|
|
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.



Description:
The GET /v3/posts/{postId} endpoint existed in PostController but was unreachable and non-functional: the path fell through to the catch-all denyAll() security rule, and PostServiceImpl.findById() was an unimplemented stub returning null. This PR implements the endpoint to support the helpdesk integration middleware, which needs to fetch full post text by ID when relaying a negotiation.post.added webhook to the help desk.
The implementation applies the same visibility rules as the existing post-listing endpoint: public posts are readable by any negotiation participant; private posts are only accessible to the negotiation creator, admins, helpdesk integration callers, or participants whose organization matches the post's target organization. Callers holding ROLE_HELPDESK_INTEGRATION bypass the negotiation participant check entirely, as the middleware must be able to relay any post regardless of which organization it is addressed to.
The PR covers Change 4 from integration plan as described in helpdesk-integration-plan.md.
Checklist:
Required for all pull requests:
If applicable to this PR: