Skip to content

Row Level Security (RLS) based on count #3453

Answered by burggraf
titogarrido asked this question in Questions
Discussion options

You must be logged in to vote

Have you tried something like:

((SELECT
      count(*) 
    FROM
      projects
    WHERE
        projects.user_id = uid()
        AND projects.visible = true) >= 3)
      

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by titogarrido
Comment options

You must be logged in to vote
1 reply
@burggraf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants