diff --git a/pubspec.yaml b/pubspec.yaml index bba9397..be55825 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -92,7 +92,7 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - .env - - ELL-ena-logo/ + # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg diff --git a/sqls/02_user_auth_policies.sql b/sqls/02_user_auth_policies.sql index 5fe68cc..61c88c0 100644 --- a/sqls/02_user_auth_policies.sql +++ b/sqls/02_user_auth_policies.sql @@ -22,8 +22,9 @@ ALTER TABLE users ENABLE ROW LEVEL SECURITY; CREATE POLICY "Team members can view their team" ON teams FOR SELECT USING ( - -- Everyone can see all teams for now (we'll restrict this later if needed) - TRUE + id IN ( + SELECT team_id FROM users WHERE id = auth.uid() + ) ); CREATE POLICY "Only admins can update their team"