Forum Discussion
Maria_Maria
4 years agoHelper II
RLS upside-down
Hi! I need a way to allow only one user out of many to see all the data, and all other users to see the restricted data. I can't do a regular group as there are many users and they are added every...
- 4 years ago
Assuming you have an existing RLS role that is working the way you want and all you need to do is to give one of your users access to all the data. Then all you would need to do is to create a second role in your model with no restrictions or filters then add the user to this role. The permissions in roles are unioned together so this should grant unlimited access even if the user is also in the RLS role.
Anonymous
4 years agoNot applicable
The simple answer is you create 2 roles
One with your RLS and that is given to everyone
then the second as an empty one (As in create it and do nothing), this second one is what you assign to the user that need everything.
Done 🙂
That simple