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

[Feature Request] Case-insensitive comparison for string fields (not just literals) in field-level access control rules #1871

Open
LemosT opened this issue Nov 18, 2024 · 0 comments

Comments

@LemosT
Copy link

LemosT commented Nov 18, 2024

The closest I found about this was the contains function, which allows me to compare one of the column values from the model to a string literal (or array) in case-insensitive mode.

My particular case is for checking if an address (crypto wallet address) from the auth() session matches (in a case-insensitive way) the value stored on the database (so that only a logged-in user with that address can see the records related to that wallet). So the contains function doesn't work because it does not accept two variables (the second argument must be a literal).

Ideally we should have something that allows such a comparison between auth() variables (maybe even some other variables from these default functions) and values on the database. Not just a comparison between a literal and the value on the database. @ymc9 pointed out that it probably also makes sense for this to be expanded to other comparison-related functions (startsWith, endsWith, etc.).

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