feat(admin): complete integration of auth, delivery, and system infrastructure modules
This commit is contained in:
17
docs/sql/20_rls/admin/ml_system_configs_rls_v1.sql
Normal file
17
docs/sql/20_rls/admin/ml_system_configs_rls_v1.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- =====================================================================================
|
||||
-- RLS: 系统配置表安全策略
|
||||
-- 位置:docs/sql/20_rls/admin/ml_system_configs_rls_v1.sql
|
||||
-- 对象类型:RLS 策略
|
||||
-- 版本:v1
|
||||
-- 说明:允许所有登录用户读取配置;管理端全量操作通过 RPC (SECURITY DEFINER) 执行
|
||||
-- =====================================================================================
|
||||
|
||||
-- 启用 RLS
|
||||
ALTER TABLE public.ml_system_configs ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
-- 1. 允许所有登录用户读取配置 (用于前端业务逻辑判断)
|
||||
DROP POLICY IF EXISTS system_configs_select_policy ON public.ml_system_configs;
|
||||
CREATE POLICY system_configs_select_policy ON public.ml_system_configs
|
||||
FOR SELECT TO authenticated USING (true);
|
||||
|
||||
-- 管理端全量管理将通过 SECURITY DEFINER 的 RPC 接口执行,此处不再额外开放直接表操作
|
||||
Reference in New Issue
Block a user