Skip to content

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

Open
@LemosT

Description

@LemosT

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.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions