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

[Laravel]: Relationships are always exposed even if set in hidden (or not set in visible) #6678

Closed
toitzi opened this issue Sep 27, 2024 · 0 comments

Comments

@toitzi
Copy link
Contributor

toitzi commented Sep 27, 2024

API Platform version(s) affected: 4.0.1

Description
If you have a Model with a relationship defined, that relationship will always be visible / exposed, even if you define hidden or visible on the model

How to reproduce
Add relationship to a Laravel Model (for example roles) and put it inside the $hidden array on your model.

toitzi added a commit to toitzi/core that referenced this issue Sep 27, 2024
Check if is in visible or hidden (if exists) just like with regular proeprties

Closes: api-platform#6678
Signed-off-by: Tobias Oitzinger <tobiasoitzinger@gmail.com>
toitzi added a commit to toitzi/core that referenced this issue Sep 27, 2024
Check if is in visible or hidden (if exists) just like with regular proeprties

Closes: api-platform#6678
Signed-off-by: Tobias Oitzinger <tobiasoitzinger@gmail.com>
soyuka pushed a commit to toitzi/core that referenced this issue Oct 4, 2024
Check if is in visible or hidden (if exists) just like with regular proeprties

Closes: api-platform#6678
Signed-off-by: Tobias Oitzinger <tobiasoitzinger@gmail.com>
@soyuka soyuka closed this as completed in 6d4e248 Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant