api-components-bundle icon indicating copy to clipboard operation
api-components-bundle copied to clipboard

Routes manifest is returning IRIs of draft components that a user does not have access to

Open silverbackdan opened this issue 3 years ago • 3 comments

We should probably not return these IRIs as it will cause the front-end to hit 404s trying to fetch these resources if not permitted.

silverbackdan avatar Dec 02 '22 21:12 silverbackdan

Additionally, route manifest does not seem to include components within a page data resource...

silverbackdan avatar Jun 03 '25 13:06 silverbackdan

We need a new serializer context builder. This will add groups to page data classes where properties are mapped to components. Adding the #[Groups(['Route:manifest:read'])] so a dev does not have to do this manually.

silverbackdan avatar Jun 03 '25 13:06 silverbackdan

See this commit where the test was updated to include group annotation (manually) and that the publishable component is returned (even though the user is not authenticated) https://github.com/components-web-app/api-components-bundle/commit/b04809dd

When resolving, adjust the test and the test class and add a test for when a user is logged in

silverbackdan avatar Jun 03 '25 13:06 silverbackdan