Skip to content

Commit fe50ecf

Browse files
committed
test(plugin-auth): org require-MFA localized refusal, save notice and grace-period pins (WIP)
Claude-Session: https://claude.ai/code/session_01Utp6Cai3TgWyncLtR5EwF7 Co-authored-by: Claude <noreply@anthropic.com>
1 parent f53f070 commit fe50ecf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/plugins/plugin-auth/src/organization-mfa-enrollment-guard.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,10 @@ describe('#30411 on a real engine: the caller\'s locale reaches the refusal, the
545545
expect(await storedRequireMfa(engine, 'org_a')).toBe(true);
546546
expect(told).toEqual([organizationMfaRequiredNotice(21, 'zh-CN')]);
547547
// The setting changes; the next write that turns it on names the new number.
548+
// (An insert: user-context creates are the D2 guard's to refuse, so the system writes it.)
548549
grace.value = 3;
549550
await engine.insert('sys_organization', { id: 'org_c', name: 'Cove', slug: 'cove', require_mfa: true }, {
550-
...ADMIN, onNotice: (m: string) => told.push(m),
551+
...SYSTEM, onNotice: (m: string) => told.push(m),
551552
} as any);
552553
expect(told[1]).toBe(organizationMfaRequiredNotice(3, 'en'));
553554
// A re-save of the stored `true` answers no notice.

0 commit comments

Comments
 (0)