feat: public split visibility, RLS recursion fixes, and consolidated tasting permission management
- Added public discovery section for active splits on the landing page - Refactored split detail page for guest support and login redirects - Extracted SplitCard component for reuse - Consolidated RLS policies for bottles and tastings to resolve permission errors - Added unified SQL consolidation script for RLS and naming fixes - Enhanced service logging for better database error diagnostics
This commit is contained in:
9
rls_split_participant_access.sql
Normal file
9
rls_split_participant_access.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Allow participants to see the split record even if it's not active anymore
|
||||
DROP POLICY IF EXISTS "bottle_splits_participant_view" ON bottle_splits;
|
||||
CREATE POLICY "bottle_splits_participant_view" ON bottle_splits
|
||||
FOR SELECT USING (
|
||||
EXISTS (
|
||||
SELECT 1 FROM split_participants
|
||||
WHERE split_id = bottle_splits.id AND user_id = (SELECT auth.uid())
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user