Skip to content

fix(router): Fix inheritance of private props in nested sets #9306

Closed
dac09 wants to merge 5 commits intoredwoodjs:mainfrom
dac09:fix/private-prop-inheritance-2
Closed

fix(router): Fix inheritance of private props in nested sets #9306
dac09 wants to merge 5 commits intoredwoodjs:mainfrom
dac09:fix/private-prop-inheritance-2

Conversation

@dac09
Copy link
Copy Markdown
Contributor

@dac09 dac09 commented Oct 16, 2023

Fixes the issue described in https://community.redwoodjs.com/t/private-route-error-with-7-0-0-canary-347/5337

Tldr;
When you nest <Private> or <Set private> under another one, we assume the child Set is private also. BUT we had extra logic to check that unauthenticated was also set on any private set. This PR makes sure that the unauthenticated is passed down from the parent set, but also can be overriden in the current Set.

See the test for more details - it's hard to describe!

@dac09 dac09 added the release:fix This PR is a fix label Oct 16, 2023
@dac09 dac09 added this to the next-release-patch milestone Oct 16, 2023
@dac09 dac09 marked this pull request as ready for review October 16, 2023 08:04
dac09 added 2 commits October 16, 2023 15:08
to make reading and refactoring easer
Tobbe added a commit to Tobbe/redwood that referenced this pull request Oct 17, 2023
@Tobbe
Copy link
Copy Markdown
Contributor

Tobbe commented Oct 17, 2023

This issue is already fixed in #9303
I copied over the nestedSets test from this PR to make sure. Thanks for taking the time to write that test-case 🙏

@dac09 dac09 closed this Oct 17, 2023
@Tobbe Tobbe mentioned this pull request Oct 18, 2023
@jtoar jtoar removed this from the next-release-patch milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix This PR is a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants