You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENG-420:
Upon space creation, create an anonymous supabase user for the space.
Ensure it is written in as a space "participant" (for future RLS function)
Trigger to delete it when the space is deleted.
All this machinery is tied to getContext.
Auxiliary function to get a supabase client logged in with that anonymous user.
ALTERTYPE public."AgentType" ADD VALUE IF NOT EXISTS 'anonymous';
2
+
3
+
CREATE OR REPLACEFUNCTIONpublic.get_space_anonymous_email(platform public."Platform", space_id BIGINT) RETURNS character varying LANGUAGE sql IMMUTABLE AS $$
Copy file name to clipboardExpand all lines: packages/database/supabase/schemas/space.sql
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,3 +27,21 @@ ALTER TABLE public."Space" OWNER TO "postgres";
27
27
GRANT ALL ON TABLE public."Space" TO anon;
28
28
GRANT ALL ON TABLE public."Space" TO authenticated;
29
29
GRANT ALL ON TABLE public."Space" TO service_role;
30
+
31
+
CREATE OR REPLACEFUNCTIONpublic.get_space_anonymous_email(platform public."Platform", space_id BIGINT) RETURNS character varying LANGUAGE sql IMMUTABLE AS $$
0 commit comments