Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): include check for parent permissions in renderField #10729

Merged

Conversation

akhrarovsaid
Copy link
Contributor

What?

This PR fixes an issue where if a field was nested, then RenderField would check for permissions against its' own field name before checking if the parent field was true.

Why?

To prevent undefined permissions on fields where the parents permission evaluated to true.

How?

By adding an additional check to the permissions prop passed to RenderField.

Fixes #10720

@JarrodMFlesch JarrodMFlesch self-requested a review January 27, 2025 14:24
@JarrodMFlesch
Copy link
Contributor

@akhrarovsaid thanks for opening the PR! The issue actually was with the tab component not passing permissions down correctly. I pushed a commit that corrects that 👍

@JarrodMFlesch JarrodMFlesch merged commit 8289588 into payloadcms:main Jan 27, 2025
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access control applied to incorrect fields
2 participants