fix(admin): restore product visibility and code copying
Independent Staging Quality Gate / validate (push) Successful in 13m47s
Independent Staging Quality Gate / publish (push) Successful in 10m6s

This commit is contained in:
Jesse_Chen
2026-08-17 10:25:16 +08:00
parent 1cbdb774e0
commit 7050f7ee17
5 changed files with 71 additions and 1 deletions
@@ -162,6 +162,24 @@ test("billing, subscriptions, usage authorization, RBAC, and model publication r
assert.equal(sql("select pg_has_role('admin_runtime','service_role','MEMBER')"), "f");
assert.equal(sql("select has_function_privilege('admin_runtime','public.admin_permission_keys(uuid)','execute')"), "t");
assert.equal(sql("select has_column_privilege('admin_runtime','public.profiles','birth_date','select')"), "f");
assert.equal(
fixture.psqlAs(
"admin_runtime",
"admin-runtime-test-password",
"select name from public.billing_products where code='standard_monthly'",
),
"标准月卡",
"admin product lists must not be hidden by billing_products RLS",
);
assert.equal(
fixture.psqlAs(
"admin_runtime",
"admin-runtime-test-password",
"select count(*) from public.product_entitlements where product_id='00000000-0000-4000-8000-000000000902'",
),
"3",
"admin product details must not be hidden by product_entitlements RLS",
);
expectAdminRuntimeError("set role service_role", /permission denied to set role/);
expectSqlError(
`select * from public.admin_manage_role('${ids.owner}','${ids.owner}','owner',false,'不得移除最后 Owner','last-owner')`,