Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ describe('OrganizationsPlugin', () => {
expect(opCtx.data.organization_id).toBeUndefined();
});

// [#2937] The legitimate "set org_id on behalf" path (per-org seed replay /
// orphan-claim, migrations) runs under SYSTEM_CTX — it must keep an explicit
// [#2937] The legitimate "set org_id on behalf" path (per-org seed replay,
// migrations) runs under SYSTEM_CTX — it must keep an explicit
// cross-org value verbatim, and it meets neither the stamp nor the wall.
it('[#2937] system context preserves an explicit cross-org organization_id (on-behalf writes unaffected)', async () => {
const plugin = new OrganizationsPlugin();
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/organizations/src/organizations-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ export class OrganizationsPlugin implements Plugin {
//
// `isSystem` short-circuited above, so the legitimate writers that
// deliberately name another organization — the per-org seed replay,
// the orphan claim, imports, migrations — run under SYSTEM_CTX and
// meet neither this stamp nor the wall.
// imports, migrations — run under SYSTEM_CTX and meet neither this
// stamp nor the wall.
if (data.organization_id == null || data.organization_id === '') {
data.organization_id = opCtx.context.tenantId;
}
Expand Down
Loading