© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
BoogersLLC

Shared Data Example

Hello,

I'm coming over from Firebase and haven't worked with Data Models like this in a while (Or RLS at all really).

I'm trying to make a contrived example of sharing data between users to better understand how to model a real world project.

So imagine I have
Users
Users
: A, B, C. and a another table
Blogs
Blogs


User A
User A
creates
Blog X
Blog X


User A
User A
invites
User B
User B
to able to SELECT/UPDATE to
Blog X
Blog X

and invites
User C
User C
to only be able to SELECT from
Blog X
Blog X


---

Is this something that I would handle with RLS? Does anyone have any examples that could get me going in a direction? I've read through auth policies but most examples like this one seem to be somewhat static (the email
@blizzard
@blizzard
isn't something one user could assign/share to another)

I'm guessing I may need to add a new role? But I'm not sure how to do that on a many-to-many relationship. i.e. Many users will have different access to many blogs.

Also, to reiterate, Blogs is just a contrived example. Imagine this scenario with anything. Chat rooms, Trello cards, Google Docs, etc...
Part Three: Policies | Supabase
Supabase Auth Deep Dive Part 3: User Based Access Policies
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Select from table where column data is shared
SupabaseSSupabase / help-and-questions
4y ago
Realtime example
SupabaseSSupabase / help-and-questions
13mo ago
Edge function shared code
SupabaseSSupabase / help-and-questions
3mo ago
Shared Pooler certificate expired?
SupabaseSSupabase / help-and-questions
4mo ago