Skip to content

Commit 0239ff1

Browse files
committed
test(plugin-security): the owner-may-edit delegator holds its set by a direct grant (#24757)
controlled-by-parent-owner-may-edit.test.ts landed on main (#26005) after this branch's base. Its delegator reached omd_requester through a sys_user_position row named after the set, the fold this PR retires, so the delegated-update pin refused at the on-behalf-of check instead of the master gate. The row is now a sys_user_permission_set grant, the same rebinding the chain-middle-master suite received; every expectation is unchanged. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8LYP8UCJURxbFWZqnywyD
1 parent 6d0d586 commit 0239ff1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/plugins/plugin-security/src/controlled-by-parent-owner-may-edit.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ beforeAll(async () => {
180180
id, name: id, email: `${id}@omd.test`,
181181
})), SYS);
182182
await engine.insert('sys_organization', [{ id: ORG, name: 'OMD', slug: 'omd' }], SYS);
183-
// The delegator holds the requester's set through a stored position row
183+
// The delegator holds the requester's set through a stored direct grant row
184184
// owned by ORG, so the on-behalf-of link resolves to the same grants the
185185
// owner holds — and NO `sys_member` row, so no ownership floor binds the
186186
// delegator's pass: the only thing left to refuse a delegated update is the
187187
// master gate, which is the pin (see the chain-middle-master suite for why
188188
// the row lands straight through the driver).
189-
await (engine as any).getDriver('sys_user_position').create('sys_user_position', {
190-
id: 'up_delegator', user_id: DELEGATOR, position: REQUESTER_SET.name, organization_id: ORG,
189+
await (engine as any).getDriver('sys_user_permission_set').create('sys_user_permission_set', {
190+
id: 'ups_delegator', user_id: DELEGATOR, permission_set: REQUESTER_SET.name, organization_id: ORG,
191191
});
192192

193193
let securityService: unknown;

0 commit comments

Comments
 (0)