fix(publishing): enforce permission on retry and restrict getunsendbundles to owner (#36414, #36415) - #36446
Merged
hassandotcms merged 2 commits intoJul 8, 2026
Conversation
…rict getunsendbundles to owner (#36414, #36415) #36414: PublishingRetryHelper now verifies the caller holds PERMISSION_USE on every environment the bundle targets before re-queuing, mirroring the check push already performs via PublishingJobsHelper. Retry previously required only a backend user, so a user with no permission on a bundle's environments could re-fire the push. Admins bypass. #36415: BundleResource.getUnsendBundles now rejects (403) a caller requesting another user's draft bundles via the path userId; admins may query any user. The path userId was client-supplied with no owner check, letting any backend user enumerate others' drafts (and, when passing an admin id, all bundles via the factory's admin branch). Adds integration coverage in PublishingResourceIntegrationTest and BundleResourceTest for the rejection and allowed paths, with user cleanup in @afterclass.
3 tasks
Contributor
|
Claude finished @hassandotcms's task in 3m 31s —— View job Code Review — PR #36446
Reviewer feedback status✅ jcastro-dotcms's requested message change is already applied (commit
This matches the requested wording exactly. New IssuesNo blocking issues found. The changes are sound:
Minor observations (non-blocking)
Test coverageGood — both the reject and allowed paths are covered for each endpoint:
Verdict: LGTM. The single review comment is already resolved; no blocking issues remain. • |
jcastro-dotcms
requested changes
Jul 7, 2026
hassandotcms
marked this pull request as ready for review
July 8, 2026 12:23
Address PR review: name the USE permission explicitly in the retry authorization failure message. No logic change.
jcastro-dotcms
approved these changes
Jul 8, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
hassandotcms
deleted the
issue-36414-publishing-retry-and-bundle-endpoint-authorization
branch
July 8, 2026 14:51
3 tasks
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.
Hardens two Push Publishing endpoints surfaced during the Publishing Queue Angular migration.
#36414 : retry authorization. POST /api/v1/publishing/retry only required a backend user, so a user with no permission on a bundle's environments could re-fire the push. Retry now verifies PERMISSION_USE on every environment the bundle targets (the same check push already does); admins bypass.
#36415 : bundle draft GET /api/bundle/getunsendbundles/userid/{userId} took the userId from the URL with no owner check, letting any backend user list another user's draft bundles; and passing an admin's id returned all bundles. Now restricted to the caller's own id; admins may query anyone.
Compatibility: No drift for existing clients; all shipped callers (Angular Add-to-Bundle, dot-rules, legacy Dojo dialog, legacy queue JSP) use the current user's own id; legacy retry (RemotePublishAjaxAction) is a separate, untouched endpoint. No GraphQL/schema/DB changes. Rollback-safe.
Tests: Integration coverage for reject + allowed paths in PublishingResourceIntegrationTest and BundleResourceTest
Closes #36414
Closes #36415
This PR fixes: #36414