Skip to content

Fix CombinedFindManyRecords with permissions #12805

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

Merged

Conversation

Weiko
Copy link
Member

@Weiko Weiko commented Jun 23, 2025

Context

This was already for relations but not the root object. This caused issues with pages where we query multiple objects with the CombinedFindManyRecords such as the data model

In the example below, we don't have access to rockets so we don't see the real number of instances (now displays 0) and the FE shouldn't query it.
Screenshot 2025-06-23 at 19 23 51

Diff
Screenshot 2025-06-23 at 19 39 05
Screenshot 2025-06-23 at 19 38 57

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Fixed permission handling in CombinedFindManyRecords to properly filter root-level objects in addition to relations, particularly affecting data model views using multiple object queries.

  • Modified useGenerateCombinedFindManyRecordsQuery to filter operation signatures based on user permissions before query generation
  • Improved query generation flow by moving parameter handling after permission checks
  • Fixed potential unauthorized access issues in pages using CombinedFindManyRecords for multiple object queries

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Jun 23, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:41169

This environment will automatically shut down when the PR is closed or after 5 hours.

@charlesBochet charlesBochet merged commit d248e53 into main Jun 23, 2025
54 checks passed
@charlesBochet charlesBochet deleted the c--fix-combined-find-many-records-with-permissions branch June 23, 2025 19:28
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.

2 participants