refactor: flatten monorepo structure to backend/ frontend/ devops/
Rename subdirectories for a cleaner single-repo layout: - website-monitoring-backend/ → backend/ - website-monitoring-frontend/ → frontend/ - website-monitoring-devops/ → devops/ Update all references in package.json scripts, CI workflows, docker-compose, pre-commit hooks, and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
-- Fix RLS policies for users table to allow proper user details loading
|
||||
-- Add policies for SELECT operations on users table
|
||||
|
||||
-- Allow users to select their own profile
|
||||
CREATE POLICY "Users can select their own profile" ON public.users
|
||||
FOR SELECT USING (auth.uid() = id);
|
||||
|
||||
-- Allow users to select profiles in their organization
|
||||
CREATE POLICY "Users can select profiles in their organization" ON public.users
|
||||
FOR SELECT USING (
|
||||
organization_id IN (
|
||||
SELECT organization_id FROM public.users WHERE id = auth.uid()
|
||||
)
|
||||
);
|
||||
|
||||
-- Allow service role to select any user (for admin operations)
|
||||
CREATE POLICY "Service role can select any user" ON public.users
|
||||
FOR SELECT USING (auth.role() = 'service_role');
|
||||
|
||||
-- Refresh schema cache
|
||||
NOTIFY pgrst, 'reload schema';
|
||||
Reference in New Issue
Block a user