Policy Type: SELECTRole: authenticatedRule: Users can view discarded emails from their Gmail accounts.
CREATE POLICY "Users can view their own discarded emails" ON discarded_emails FOR SELECT USING ( user_oauth_token_id IN ( SELECT id FROM public.user_oauth_tokens WHERE user_id = auth.uid() ) );
Users can insert their own discarded emails
Policy Type: INSERTRole: authenticatedRule: Users can insert discarded emails for their own accounts.
CREATE POLICY "Users can insert their own discarded emails" ON discarded_emails FOR INSERT WITH CHECK ( user_oauth_token_id IN ( SELECT id FROM public.user_oauth_tokens WHERE user_id = auth.uid() ) );
Users can delete their own discarded emails
Policy Type: DELETERole: authenticatedRule: Users can delete their own discarded email records.
CREATE POLICY "Users can delete their own discarded emails" ON discarded_emails FOR DELETE USING ( user_oauth_token_id IN ( SELECT id FROM public.user_oauth_tokens WHERE user_id = auth.uid() ) );
Policy Type: SELECTRole: authenticatedRule: Users can read their own notification preferences.
CREATE POLICY "user_notification_preferences_select_own" ON public.user_notification_preferences FOR SELECT TO authenticated USING (user_id = auth.uid());
user_notification_preferences_insert_own
Policy Type: INSERTRole: authenticatedRule: Users can create their own notification preferences.
CREATE POLICY "user_notification_preferences_insert_own" ON public.user_notification_preferences FOR INSERT TO authenticated WITH CHECK (user_id = auth.uid());
user_notification_preferences_update_own
Policy Type: UPDATERole: authenticatedRule: Users can update their own notification preferences.
CREATE POLICY "user_notification_preferences_update_own" ON public.user_notification_preferences FOR UPDATE TO authenticated USING (user_id = auth.uid()) WITH CHECK (user_id = auth.uid());
user_notification_preferences_delete_own
Policy Type: DELETERole: authenticatedRule: Users can delete their own notification preferences.
CREATE POLICY "user_notification_preferences_delete_own" ON public.user_notification_preferences FOR DELETE TO authenticated USING (user_id = auth.uid());
RLS Status: EnabledRealtime: Enabled via supabase_realtime publication
notifications_select_own
Policy Type: SELECTRole: authenticatedRule: Users can read their own notifications.
CREATE POLICY "notifications_select_own" ON public.notifications FOR SELECT TO authenticated USING (user_id = auth.uid());
notifications_insert_own
Policy Type: INSERTRole: authenticatedRule: Users can create notifications for themselves.
CREATE POLICY "notifications_insert_own" ON public.notifications FOR INSERT TO authenticated WITH CHECK (user_id = auth.uid());
notifications_update_own
Policy Type: UPDATERole: authenticatedRule: Users can update their own notifications (e.g., mark as read).
CREATE POLICY "notifications_update_own" ON public.notifications FOR UPDATE TO authenticated USING (user_id = auth.uid()) WITH CHECK (user_id = auth.uid());
notifications_delete_own
Policy Type: DELETERole: authenticatedRule: Users can delete their own notifications.
CREATE POLICY "notifications_delete_own" ON public.notifications FOR DELETE TO authenticated USING (user_id = auth.uid());