29 lines
829 B
SQL
29 lines
829 B
SQL
-- ============================================
|
|
-- 此文件由 Meoo Cloud 自动生成,请勿修改
|
|
-- This file is auto-generated by Meoo Cloud, DO NOT MODIFY
|
|
-- ============================================
|
|
|
|
|
|
-- 为 product_images 存储桶添加 RLS 策略
|
|
CREATE POLICY anon_select_product_images ON storage.objects
|
|
FOR SELECT USING (bucket_id = 'product_images');
|
|
|
|
CREATE POLICY users_insert_product_images ON storage.objects
|
|
FOR INSERT WITH CHECK (
|
|
bucket_id = 'product_images' AND
|
|
auth.role() = 'authenticated'
|
|
);
|
|
|
|
CREATE POLICY users_update_product_images ON storage.objects
|
|
FOR UPDATE WITH CHECK (
|
|
bucket_id = 'product_images' AND
|
|
auth.role() = 'authenticated'
|
|
);
|
|
|
|
CREATE POLICY users_delete_product_images ON storage.objects
|
|
FOR DELETE USING (
|
|
bucket_id = 'product_images' AND
|
|
auth.role() = 'authenticated'
|
|
);
|
|
|