@i4e/invest4edu-access-core 0.43.2 → 0.43.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i4e/invest4edu-access-core",
3
- "version": "0.43.2",
3
+ "version": "0.43.3",
4
4
  "description": "Shared access-control primitives for NeoFindesk: tenant keystone, role capabilities, reportee tree, entity/role vocabulary, mobile app identity, feature flags, and the unified access engine (registry schema, snapshot resolver, visibleWhen).",
5
5
  "type": "module",
6
6
  "exports": {
@@ -76,7 +76,9 @@ export function createClientProfileService({ getDb, getSettings, getSideContext
76
76
  if (!isEvaluated(settings, "attach")) return { attached: false, kind: "none", reason: "mode_off" };
77
77
  const profile = await db().collection(CLIENTS).findOne(
78
78
  { _id: clientId },
79
- { session, projection: { distributor_id: 1, distributor_mappings: 1, linked_users: 1 } },
79
+ // profile_type is what the corporate silo in attachDecision reads — without it every profile
80
+ // looked like a main one and another firm could be attached to a corporate profile.
81
+ { session, projection: { distributor_id: 1, distributor_mappings: 1, linked_users: 1, profile_type: 1 } },
80
82
  );
81
83
  const decision = attachDecision({ profile, actor, via, at: now(), settings, ctx: getSideContext(), stamps });
82
84
  if (decision.kind === "none") return { attached: false, ...decision };