RLS policy including a auth.uid() statement
Hello,
I have been trying to setup a RLS policy which is using the
For demonstration purposes I've included some
When the created user tries to fetch the data it receives an empty array which probably means the policy statement is
Is there something wrong with this stament? As far as I know it should be working. I've included the source files to test.
Thanks in advance!
I have been trying to setup a RLS policy which is using the
auth.uid(), but it doesn't really seem to work the way I expect it to do. The goal I am trying to achieve is the following: Being able to select/read data when the user has a specific uuid. Doesn't seem that hard to me. For demonstration purposes I've included some
migration and seed code.migration.sqlseed.sqlWhen the created user tries to fetch the data it receives an empty array which probably means the policy statement is
false. When I replace the statement auth.uid() = '0ba6ec03-1a07-43f0-aa41-380204bb5319' with true the user receives the correct data.Is there something wrong with this stament? As far as I know it should be working. I've included the source files to test.
Thanks in advance!
source-files.zip1.42KB