From 3a758ca0c25971a8977babb8f9e77b2ee2e602aa Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Oct 2026 15:29:06 +0000 Subject: [PATCH 1/2] fix(platform-objects): sys_session.revoke_reason description names admin_password_reset Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude --- .changeset/23477-revoke-reason-vocabulary.md | 5 +++++ .../src/identity/sys-session.object.ts | 5 ++++- .../forced-reset-revoke-reason-vocabulary.test.ts | 13 +++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .changeset/23477-revoke-reason-vocabulary.md create mode 100644 packages/plugins/plugin-auth/src/forced-reset-revoke-reason-vocabulary.test.ts diff --git a/.changeset/23477-revoke-reason-vocabulary.md b/.changeset/23477-revoke-reason-vocabulary.md new file mode 100644 index 00000000000..7c2c73539c1 --- /dev/null +++ b/.changeset/23477-revoke-reason-vocabulary.md @@ -0,0 +1,5 @@ +--- +'@objectstack/platform-objects': patch +--- + +fix(platform-objects): the `sys_session.revoke_reason` description names `admin_password_reset`, the value an administrator's forced password reset writes on the sessions it revokes. Description text only; nothing is accepted or refused differently. diff --git a/packages/platform-objects/src/identity/sys-session.object.ts b/packages/platform-objects/src/identity/sys-session.object.ts index 19a616254b3..aae18c1bd04 100644 --- a/packages/platform-objects/src/identity/sys-session.object.ts +++ b/packages/platform-objects/src/identity/sys-session.object.ts @@ -196,9 +196,12 @@ export const SysSession = ObjectSchema.create({ // backing a session's active organization ends and the user holds no // other. ⛔ It is a COURTESY, never the enforcement: the wall is the // per-request membership check in `resolve-authz-context.ts`. + // `admin_password_reset` is the second authorization-event cause: an + // administrator's forced password reset revoked the session + // (`plugin-auth/forced-reset-revocation.ts`, `FORCED_RESET_REVOKE_REASON`). description: 'Why the session was revoked (idle_timeout, absolute_max, concurrent_cap, user_revoked, ' - + 'admin, organization_membership_ended, …).', + + 'admin, organization_membership_ended, admin_password_reset, …).', }), // ── Active context (multi-org/team) ────────────────────────── diff --git a/packages/plugins/plugin-auth/src/forced-reset-revoke-reason-vocabulary.test.ts b/packages/plugins/plugin-auth/src/forced-reset-revoke-reason-vocabulary.test.ts new file mode 100644 index 00000000000..cdbc59f6a08 --- /dev/null +++ b/packages/plugins/plugin-auth/src/forced-reset-revoke-reason-vocabulary.test.ts @@ -0,0 +1,13 @@ +import { describe, it, expect } from 'vitest'; +import { SysSession } from '@objectstack/platform-objects/identity'; +import { FORCED_RESET_REVOKE_REASON } from './forced-reset-revocation'; + +// `sys_session.revoke_reason` is free text; its description is the only +// published vocabulary, so a value this producer writes must be named there. +describe('sys_session.revoke_reason vocabulary', () => { + it('names the value a forced reset writes', () => { + expect(FORCED_RESET_REVOKE_REASON).toBe('admin_password_reset'); + const description = String((SysSession.fields as any).revoke_reason.description); + expect(description).toContain(FORCED_RESET_REVOKE_REASON); + }); +}); From 94ff3ae7fdd561acef2492fca8f0db5f5717d7ab Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Oct 2026 15:41:26 +0000 Subject: [PATCH 2/2] fix(platform-objects): regenerate and translate revoke_reason help Claude-Session: https://claude.ai/code/session_01D6F9axfoPzR7t8G1J7Ytzz Co-authored-by: Claude --- .../src/apps/translations/en.objects.generated.ts | 2 +- .../src/apps/translations/es-ES.objects.generated.ts | 2 +- .../src/apps/translations/ja-JP.objects.generated.ts | 2 +- .../src/apps/translations/zh-CN.objects.generated.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/platform-objects/src/apps/translations/en.objects.generated.ts b/packages/platform-objects/src/apps/translations/en.objects.generated.ts index 10fb1038d4b..5525e1dfd5e 100644 --- a/packages/platform-objects/src/apps/translations/en.objects.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.objects.generated.ts @@ -342,7 +342,7 @@ export const enObjects: NonNullable = { }, revoke_reason: { label: "Revoke Reason", - help: "Why the session was revoked (idle_timeout, absolute_max, concurrent_cap, user_revoked, admin, organization_membership_ended, …)." + help: "Why the session was revoked (idle_timeout, absolute_max, concurrent_cap, user_revoked, admin, organization_membership_ended, admin_password_reset, …)." }, active_organization_id: { label: "Active Organization" diff --git a/packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts b/packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts index 0127c07f74d..bfa152b1993 100644 --- a/packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts +++ b/packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts @@ -342,7 +342,7 @@ export const esESObjects: NonNullable = { }, revoke_reason: { label: "Motivo de la revocación", - help: "Por qué se revocó la sesión (idle_timeout, absolute_max, concurrent_cap, user_revoked, admin, organization_membership_ended, …)." + help: "Por qué se revocó la sesión (idle_timeout, absolute_max, concurrent_cap, user_revoked, admin, organization_membership_ended, admin_password_reset, …)." }, active_organization_id: { label: "Organización activa" diff --git a/packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts b/packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts index 731d9ebb966..0a0a5a79ea0 100644 --- a/packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts +++ b/packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts @@ -342,7 +342,7 @@ export const jaJPObjects: NonNullable = { }, revoke_reason: { label: "失効理由", - help: "セッションが失効した理由(idle_timeout、absolute_max、concurrent_cap、user_revoked、admin、organization_membership_ended など)。" + help: "セッションが失効した理由(idle_timeout、absolute_max、concurrent_cap、user_revoked、admin、organization_membership_ended、admin_password_reset など)。" }, active_organization_id: { label: "アクティブ組織" diff --git a/packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts b/packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts index 79195a1e9e5..c41a7bd1e82 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts @@ -342,7 +342,7 @@ export const zhCNObjects: NonNullable = { }, revoke_reason: { label: "撤销原因", - help: "会话被撤销的原因(idle_timeout、absolute_max、concurrent_cap、user_revoked、admin、organization_membership_ended 等)。" + help: "会话被撤销的原因(idle_timeout、absolute_max、concurrent_cap、user_revoked、admin、organization_membership_ended、admin_password_reset 等)。" }, active_organization_id: { label: "当前组织"