添加首页加载skeleton
This commit is contained in:
@@ -79,6 +79,7 @@ ALTER TABLE public.ml_delivery_staff ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.ml_delivery_stations ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
DROP POLICY IF EXISTS delivery_staff_self_select ON public.ml_delivery_staff;
|
||||
DROP POLICY IF EXISTS delivery_staff_self_update ON public.ml_delivery_staff;
|
||||
CREATE POLICY delivery_staff_self_select
|
||||
ON public.ml_delivery_staff
|
||||
FOR SELECT
|
||||
@@ -93,6 +94,29 @@ CREATE POLICY delivery_staff_self_select
|
||||
)
|
||||
);
|
||||
|
||||
CREATE POLICY delivery_staff_self_update
|
||||
ON public.ml_delivery_staff
|
||||
FOR UPDATE
|
||||
TO authenticated
|
||||
USING (
|
||||
deleted_at IS NULL
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM public.ak_users u
|
||||
WHERE u.id = ml_delivery_staff.uid
|
||||
AND u.auth_id = auth.uid()
|
||||
)
|
||||
)
|
||||
WITH CHECK (
|
||||
deleted_at IS NULL
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM public.ak_users u
|
||||
WHERE u.id = ml_delivery_staff.uid
|
||||
AND u.auth_id = auth.uid()
|
||||
)
|
||||
);
|
||||
|
||||
DROP POLICY IF EXISTS delivery_stations_select_active ON public.ml_delivery_stations;
|
||||
CREATE POLICY delivery_stations_select_active
|
||||
ON public.ml_delivery_stations
|
||||
|
||||
Reference in New Issue
Block a user