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:
2025-12-28 22:02:46 +01:00
parent 332bfdaf02
commit 9d6a8b358f
25 changed files with 2014 additions and 495 deletions

View 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())
)
);