RLS on INSERT with linking table
Hi there,
Everyone should be able to insert into a table but only select if they have an entry in the linking table.
The issue here is that I need the team_id for the insert in the linking table (team_members).
I've been searching the internet for the answer but I can't seem to find it.
My table structure is as follows:
teams <-- team_members --> members
RLS statements on teams:
INSERT
SELECT
Hopefully someone can help me with this, thanks in advance!
Everyone should be able to insert into a table but only select if they have an entry in the linking table.
The issue here is that I need the team_id for the insert in the linking table (team_members).
I've been searching the internet for the answer but I can't seem to find it.
My table structure is as follows:
teams <-- team_members --> members
RLS statements on teams:
INSERT
trueSELECT
Hopefully someone can help me with this, thanks in advance!