Skip to content

fix: respects boolean query preset constraints #12124

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
merged 3 commits into from
Apr 16, 2025

Conversation

jacobsfletch
Copy link
Member

@jacobsfletch jacobsfletch commented Apr 15, 2025

Returning a boolean value from a constraint-level access control function does nothing. For example:

{
  label: 'Noone',
  value: 'noone',
  access: () => false,
},

This is because we were only handling query objects, disregarding any boolean values. The fix is to check if the query is a boolean, and if so, format a query object to return.

@jacobsfletch jacobsfletch merged commit a675c04 into main Apr 16, 2025
78 checks passed
@jacobsfletch jacobsfletch deleted the fix/query-preset-access branch April 16, 2025 13:16
Copy link
Contributor

🚀 This is included in version v3.35.0

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