Skip to content

Commit 3ec1f3e

Browse files
committed
test(plugin-security): the agent-ceiling grant suite names users its writer reads
A grant's holder is a `user` value, so a non-system write naming it must name a user its caller can read; the suite provisions its three users, as the sibling grant suites do, so the set the row names is what it measures. Claude-Session: https://claude.ai/code/session_01Utp6CYQjMkN514R78sCrTT Co-authored-by: Claude <noreply@anthropic.com>
1 parent ecaf3bc commit 3ec1f3e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/plugins/plugin-security/src/agent-ceiling-grant-refusal.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { SysUser } from '@objectstack/platform-objects/identity';
3030

3131
import { SecurityPlugin } from './security-plugin.js';
3232
import { SysUserPermissionSet } from './objects/sys-user-permission-set.object.js';
33+
import { provisionRigUsers } from './__tests__/rig-users.testkit.js';
3334
import {
3435
AGENT_CEILING_GRANT_HOOK_PACKAGE,
3536
isAgentCeilingPermissionSet,
@@ -91,11 +92,12 @@ async function boot() {
9192
objects: [SysUserPermissionSet],
9293
} as any);
9394
await engine.syncSchemas();
94-
// `sys_user` registered and unprovisioned, as in the sibling grant suites: the
95-
// engine's `user_id` existence probe stands down, and no `sys_member` object
96-
// is registered, so the holder-membership refusal stands down too. What is
97-
// measured here is the set the row names, alone.
95+
// `sys_user` registered, and no `sys_member` object, so the holder-membership
96+
// refusal stands down. [#29029] Each grant's holder is a user the writer
97+
// reads, as in the sibling grant suites. What is measured here is the set
98+
// the row names, alone.
9899
if (!engine.registry.getObject(SysUser.name)) engine.registry.registerObject(SysUser as never, 'qa.agent-ceiling');
100+
await provisionRigUsers(engine, ['u_person', 'u_person_2', 'u_platform']);
99101
engines.push(engine);
100102

101103
const services: Record<string, unknown> = {

0 commit comments

Comments
 (0)