Repository navigation
Conversation
The container content endpoints now resolve a contentlet given by identifier with the caller's permissions: back-end users in edit mode are checked on the working version, any other user on the live version. A user without READ gets 403 with a generic message; a contentlet with no version to serve gets 404. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lookup-read-check # Conflicts: # dotcms-integration/src/test/java/com/dotcms/MainSuite2a.java
… under Time Machine - Content given by identifier no longer resolves archived versions, as before this change. - While a Time Machine date is set, a caller served live content must also be able to read the working version, since the container can render it. - Tests for the DEFAULT-variant preference, the working version served to back-end users, admin and inode access, and anonymous-only READ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lookup-read-check # Conflicts: # dotCMS/src/main/java/com/dotcms/rest/api/v1/container/ContainerResource.java
AP2300
requested review from
adrianjm-dotCMS,
hassandotcms,
hmoreras,
jcastro-dotcms and
nicobytes
October 29, 2026 15:25
This branch has not been deployed
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.
Summary
GET /api/v1/containers/{containerId}/content/{contentletId}andGET /api/v1/containers/content/{contentletId}?containerId=render a contentlet inside a container. When the contentlet is given by identifier, it is now resolved with the caller's permissions, the same way the inode form already was.Changes
ContainerResource.containerContent, identifier form:contentletAPI.find(inode, user, true).publishDate), a caller served the live version must also be able to read the working version, because the container can then render the working version of scheduled content.VersionableAPI, already a constructor argument, is now kept as a field.containerContent, the new helper and the testing constructor. No@Operation/@ApiResponsechanges, soopenapi.yamlis unchanged.Tests
ContainerResourceTest(unit, new, 11 tests):error-messageheader carry no contentlet title, identifier or inode;ContainerResourceContentReadAccessTest(integration, new, 19 tests, registered inMainSuite3awithjust add-it-test). It runs with real users, roles, content and permissions; onlyWebResourceand the Velocity merge are mocked. It covers:Suite placement: per
docs/testing/INTEGRATION_TESTS.md, the new JUnit 4 class goes in theMainSuite*thatjust suite-timingsnames (8 runs sampled, 2026-10-29):Risk
Fixes dotCMS/private-issues#734
🤖 Generated with Claude Code