Skip to content

Commit 0a759ee

Browse files
committed
test(plugin-security): type the state lists the new pins iterate
Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f Co-authored-by: Claude <noreply@anthropic.com>
1 parent 191cc69 commit 0a759ee

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/plugins/plugin-security/src/delegated-admin-gate.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ describe('[ADR-0090 D12] a delegated scope covers a user for the explain doors o
21302130
});
21312131

21322132
it('a context that names no organization covers nobody, and asks the read door nothing', async () => {
2133-
for (const state of [...TARGET_STATES, READABLE_INSIDE]) {
2133+
for (const state of [...TARGET_STATES, READABLE_INSIDE] as TargetState[]) {
21342134
const harness = harnessWith(state);
21352135
const noOrganization = { principal: 'delegate', userId: 'u_delegate', positions: ['delegate'] };
21362136
expect(await covers(harness, noOrganization), state).toBe(false);

‎packages/plugins/plugin-security/src/delegated-admin-own-name-set.posture.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ describe("[ADR-0090 D12] a delegated answer about a user the caller cannot read
867867
for (const posture of POSTURES) {
868868
describe(`posture '${posture}'`, () => {
869869
it('ground truth: the delegate reads the subject exactly in the states where it is a user the delegate may read', async () => {
870-
for (const state of [...STATES, CONTROL]) {
870+
for (const state of [...STATES, CONTROL] as State[]) {
871871
const h = await bootWith(posture, state);
872872
const rows = await h.engine.find('sys_user', { where: { id: SUBJECT }, fields: ['id'], context: delegateFor(state) } as any);
873873
const reads = (Array.isArray(rows) ? rows : []).some((r: any) => r.id === SUBJECT);

0 commit comments

Comments
 (0)