I need to take a user role (i.e., Viewer versus User) into consideration when making queries. How can I check the role in a filter? I’m looking for something simple if possible, i.e. via a sql_on statement, unless templates are the only way to do it.
For example, suppose I have a column called “Clearance” in the database. I want Users to be able to see all rows in the database, but Viewers should only see those rows with a clearance value of “5” or less.
Is this doable?
Thanks.