RLS return true if ANY are true.
I have a fairly complex RLS security rule that gives me a list of Booleans. I am hoping to return true if any value in my list is true. I am far less comfortable in SQL (and declarative languages generally) so I might be missing something very obvious.
-> Any does not actually work, I just want some way to true if ANY of the values return from this select statement are true:
ANY (select permissions.course_select from permissions where (permissions.role = (SELECT course_roles.role from course_roles where (course_roles.course = (SELECT course from concept_course_join where (concept_course_join.concept = id))))))
-> Any does not actually work, I just want some way to true if ANY of the values return from this select statement are true:
ANY (select permissions.course_select from permissions where (permissions.role = (SELECT course_roles.role from course_roles where (course_roles.course = (SELECT course from concept_course_join where (concept_course_join.concept = id))))))