-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Join field violating access control of other collection #9865
Comments
RickGeersing
added
status: needs-triage
Possible bug which hasn't been reproduced yet
validate-reproduction
labels
Dec 10, 2024
github-actions
bot
removed
the
status: needs-triage
Possible bug which hasn't been reproduced yet
label
Dec 12, 2024
DanRibbens
added a commit
that referenced
this issue
Dec 12, 2024
🚀 This is included in version v3.7.0 |
This issue has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
I have a joint field to my customers collection from my user collection. This customer is bound to an user that has a normal user role. When requesting the customers, he should only retrieve his own bound customer. Not the customers bound to other users. Customers also have an account manager. This is a user with the admin role. On the user collection for admins there is a joint field to all customers which it manages.
Normal users can view who their account manager is, but when you open the account manager with a normal user you can view all customers, instead of just one, yourself. This violates the access controls set on the customer. Since I can view names and emails of other customers with a normal account. I only get an unauthorized error when clicking on one of the edit buttons.
Link to the code that reproduces this issue
https://github.com/RickGeersing/payload-join-access-violation
Reproduction Steps
pnpm db:seed
pnpm dev
email: user1@test.nl
andpassword: user
1
itemWhich area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: