Hello, is it possible to create a policy that vali...
# sql
a
Hello, is it possible to create a policy that validates what information is passed in a query? For example, doing
SELECT * FROM Foo WHERE bar = 25
, create a policy that depends on the value of bar. I've been searching for a while and I'm not sure if that is possible at all
b
While I haven't tried, this, I'm pretty sure you can do any sort of SQL inside a security policy as long as it evaluates to TRUE or FALSE. You should be able to do anything you want.
l
a
Yes, but I mean something like validating depending on what it comes in the query. For example: If the user selects without adding "creator_id" in the where clause, it doesn't apply.