Skip to content

Commit e06f4b8

Browse files
committed
test(runtime): assert the ADR-0112 code on the Remove Manager member refusal
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1
1 parent 30de59a commit e06f4b8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/runtime/src/platform-admin-action-gate.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ describe('sys_user.remove_user_manager: the clear reaches the endpoint as `manag
191191
const { dispatcher, request } = boot();
192192
const refused = await dispatcher.handleActions(`/${OBJECT}/remove_user_manager`, 'POST', { recordId: 'u_target', params: {} }, MEMBER());
193193
expect(refused?.response?.status).toBe(403);
194+
// The ADR-0112 envelope code, the one the MCP twin above pins for this gate.
195+
expect(refused?.response?.body?.error?.code).toBe('PERMISSION_DENIED');
194196
expect(String(refused?.response?.body?.error?.message)).toContain('requires capability [manage_users]');
195197
expect(request).not.toHaveBeenCalled();
196198
});

0 commit comments

Comments
 (0)