双用户预约权限:检查证据
来自本题实际 verification.json / clean-room.json;保留未执行的工具和外部服务边界。
远端数据库验证:未执行
| A:读自己的预约 | 待真实 access token |
| A:读 B 的预约 | 预期空数组 |
| A:把 owner_id 改为 B | 预期被拒绝 |
| 匿名:读全部预约 | 预期拒绝或空数组 |
本次实际完成
assert.equal(requiredPolicies.length,4);
const sql=await readFile("schema.sql","utf8");for(const name of requiredPolicies)assert.ok(sql.includes(name));
assert.ok(sql.includes("enable row level security"));
assert.ok(sql.includes("for update to authenticated using"));
assert.ok(sql.includes("with check ((select auth.uid()) = owner_id)"));
assert.equal(JSON.parse(await readFile("fixtures.json","utf8")).length,2);上述断言只检查本地 SQL 与夹具结构,不能证明 RLS 已生效。
未创建或连接 Supabase 项目,未执行双用户数据库测试。图中是测试矩阵与本地数据说明,不是 RLS 已验证的结果。