@mj-biz-apps/common-core-entities-server 5.32.0 → 5.33.0

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.
@@ -1,61 +1,47 @@
1
- import { EntityDeleteOptions, EntitySaveOptions, UserInfo } from '@memberjunction/core';
1
+ import { UserInfo } from '@memberjunction/core';
2
2
  import { mjBizAppsCommonPersonEntity } from '@mj-biz-apps/common-entities';
3
- import { MJUserEntity } from '@memberjunction/core-entities';
4
3
  /**
5
4
  * Server-side subclass of the BAC Person entity.
6
5
  *
7
- * Lifecycle hooks:
8
- * - **Save (pre):** Auto-links to an MJ User record (creates one if needed)
9
- * - **Save (post):** Syncs name/email changes to the linked User; assigns default "UI" UserRole
10
- * - **Delete:** Deactivates the linked User (does not delete preserves audit history)
6
+ * ## v5.33.0 — MJ User decoupling
7
+ *
8
+ * Prior to v5.33.0 this class auto-provisioned MJ User accounts: saving a
9
+ * Person with an email created (or linked) an active `MJ: Users` record,
10
+ * granted it the default `'UI'` role, synced name/email changes to the User,
11
+ * wrote the User→Person back-pointer, and deactivated the User on delete.
12
+ *
13
+ * That behavior was wrong for a generic CRM layer — people recorded here
14
+ * (job applicants, CRM contacts, message senders) must not implicitly gain
15
+ * platform access. See https://github.com/MemberJunction/bizapps-common/issues/36.
16
+ *
17
+ * As of v5.33.0, saving or deleting a Person has **no MJ User side effects**.
18
+ * Platform layers that bind people to MJ Users (e.g., BCSaaS) do so through
19
+ * their own IS-A subtype of this entity (BCSaaS `BC: People`), where
20
+ * all provisioning/sync lifecycle behavior now lives. `Person.LinkedUserID`
21
+ * is deprecated (EntityField Status='Deprecated') and no longer read or
22
+ * written by bizapps-common.
23
+ *
24
+ * @deprecated This class is retained only so existing downstream subclasses
25
+ * (e.g., BCSaaS ≤1.7 `BCSaaSPersonEntityServer`) continue to load against
26
+ * BAC 5.33.x. It adds no behavior over the generated entity and will be
27
+ * removed in the next major release — extend `mjBizAppsCommonPersonEntity`
28
+ * directly instead.
11
29
  */
12
30
  export declare class PersonEntityServer extends mjBizAppsCommonPersonEntity {
13
- Save(options?: EntitySaveOptions): Promise<boolean>;
14
- Delete(options?: EntityDeleteOptions): Promise<boolean>;
15
- /**
16
- * Find an existing MJ User by email, or create a new one.
17
- * Sets LinkedUserID on the Person entity (pre-save, so it's persisted atomically).
18
- */
19
- protected autoLinkUser(): Promise<void>;
20
31
  /**
21
32
  * Find an existing MJ User by email using the cached UserCache.
22
- * UserCache is populated at server startup and refreshed periodically.
33
+ * Retained as a helper for downstream subclasses; not called by this class.
23
34
  */
24
35
  protected findCachedUserByEmail(email: string): UserInfo | undefined;
25
- /**
26
- * Create a new MJ User record from the Person's details.
27
- * Returns the new User ID, or null on failure.
28
- */
29
- protected createUser(): Promise<string | null>;
30
- /**
31
- * Assign the default MJ "UI" role to a User via the UserRole entity.
32
- * Uses Metadata.Roles (cached) for role lookup instead of a DB query.
33
- */
34
- protected assignDefaultUserRole(userID: string): Promise<void>;
35
- /**
36
- * Sync Person name/email changes to the linked MJ User record.
37
- * Called post-save — updates name/email fields and ensures the
38
- * bidirectional back-pointer (LinkedEntityID / LinkedEntityRecordID) is set.
39
- */
40
- protected syncUserRecord(isNewRecord: boolean, emailChanged: boolean): Promise<void>;
41
- /**
42
- * Set the back-pointer fields on the User so the User → Person
43
- * relationship is bidirectional. Only sets fields if not already populated.
44
- */
45
- protected setUserBackPointer(user: MJUserEntity): void;
46
- /**
47
- * Deactivate the linked User on Person deletion.
48
- * Sets IsActive=false rather than deleting, to preserve audit history.
49
- */
50
- protected deactivateLinkedUser(): Promise<void>;
51
36
  /**
52
37
  * Build a display-friendly full name from Person fields.
38
+ * Retained as a helper for downstream subclasses; not called by this class.
53
39
  */
54
40
  protected buildFullName(): string;
55
41
  /**
56
42
  * Check if the given user ID is the MJ system user.
57
43
  * The system user is a special internal record that must never be modified
58
- * by Person lifecycle hooks — doing so corrupts the entire MJ environment.
44
+ * by person-related lifecycle code — doing so corrupts the MJ environment.
59
45
  */
60
46
  protected isSystemUser(userID: string): boolean;
61
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PersonEntityServer.d.ts","sourceRoot":"","sources":["../src/PersonEntityServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAE,iBAAiB,EAAsB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAExH,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AAU/E;;;;;;;GAOG;AACH,qBACa,kBAAmB,SAAQ,2BAA2B;IAEhD,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAwBnD,MAAM,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAStE;;;OAGG;cACa,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IA2B7C;;;OAGG;IACH,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAOpE;;;OAGG;cACa,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IA8BpD;;;OAGG;cACa,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BpE;;;;OAIG;cACa,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAmD1F;;;OAGG;IACH,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAUtD;;;OAGG;cACa,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqBrD;;OAEG;IACH,SAAS,CAAC,aAAa,IAAI,MAAM;IAOjC;;;;OAIG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAIlD"}
1
+ {"version":3,"file":"PersonEntityServer.d.ts","sourceRoot":"","sources":["../src/PersonEntityServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBACa,kBAAmB,SAAQ,2BAA2B;IAE/D;;;OAGG;IACH,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAOpE;;;OAGG;IACH,SAAS,CAAC,aAAa,IAAI,MAAM;IAOjC;;;;OAIG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAIlD"}
@@ -4,233 +4,49 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { BaseEntity, LogError, Metadata } from '@memberjunction/core';
7
+ import { BaseEntity } from '@memberjunction/core';
8
8
  import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
9
9
  import { mjBizAppsCommonPersonEntity } from '@mj-biz-apps/common-entities';
10
10
  import { UserCache } from '@memberjunction/sqlserver-dataprovider';
11
- /**
12
- * The standard MJ "UI" role name — assigned as a default when creating
13
- * a new User linked to a Person. Downstream layers (e.g., BCSaaS) override
14
- * this with more specific roles.
15
- */
16
- const DEFAULT_MJ_ROLE_NAME = 'UI';
17
11
  /**
18
12
  * Server-side subclass of the BAC Person entity.
19
13
  *
20
- * Lifecycle hooks:
21
- * - **Save (pre):** Auto-links to an MJ User record (creates one if needed)
22
- * - **Save (post):** Syncs name/email changes to the linked User; assigns default "UI" UserRole
23
- * - **Delete:** Deactivates the linked User (does not delete preserves audit history)
14
+ * ## v5.33.0 — MJ User decoupling
15
+ *
16
+ * Prior to v5.33.0 this class auto-provisioned MJ User accounts: saving a
17
+ * Person with an email created (or linked) an active `MJ: Users` record,
18
+ * granted it the default `'UI'` role, synced name/email changes to the User,
19
+ * wrote the User→Person back-pointer, and deactivated the User on delete.
20
+ *
21
+ * That behavior was wrong for a generic CRM layer — people recorded here
22
+ * (job applicants, CRM contacts, message senders) must not implicitly gain
23
+ * platform access. See https://github.com/MemberJunction/bizapps-common/issues/36.
24
+ *
25
+ * As of v5.33.0, saving or deleting a Person has **no MJ User side effects**.
26
+ * Platform layers that bind people to MJ Users (e.g., BCSaaS) do so through
27
+ * their own IS-A subtype of this entity (BCSaaS `BC: People`), where
28
+ * all provisioning/sync lifecycle behavior now lives. `Person.LinkedUserID`
29
+ * is deprecated (EntityField Status='Deprecated') and no longer read or
30
+ * written by bizapps-common.
31
+ *
32
+ * @deprecated This class is retained only so existing downstream subclasses
33
+ * (e.g., BCSaaS ≤1.7 `BCSaaSPersonEntityServer`) continue to load against
34
+ * BAC 5.33.x. It adds no behavior over the generated entity and will be
35
+ * removed in the next major release — extend `mjBizAppsCommonPersonEntity`
36
+ * directly instead.
24
37
  */
25
38
  let PersonEntityServer = class PersonEntityServer extends mjBizAppsCommonPersonEntity {
26
- async Save(options) {
27
- const isNewRecord = !this.IsSaved;
28
- const emailField = this.GetFieldByName('Email');
29
- const emailChanged = emailField?.Dirty === true;
30
- const needsUserLink = isNewRecord || emailChanged;
31
- // Pre-save: auto-link to MJ User
32
- if (needsUserLink && this.Email && !this.LinkedUserID) {
33
- await this.autoLinkUser();
34
- }
35
- const saved = await super.Save(options);
36
- if (!saved) {
37
- return false;
38
- }
39
- // Post-save: sync person changes to linked User
40
- if (this.LinkedUserID) {
41
- await this.syncUserRecord(isNewRecord, emailChanged);
42
- }
43
- return true;
44
- }
45
- async Delete(options) {
46
- // Pre-delete: deactivate linked User (don't delete — audit history)
47
- if (this.LinkedUserID) {
48
- await this.deactivateLinkedUser();
49
- }
50
- return super.Delete(options);
51
- }
52
- /**
53
- * Find an existing MJ User by email, or create a new one.
54
- * Sets LinkedUserID on the Person entity (pre-save, so it's persisted atomically).
55
- */
56
- async autoLinkUser() {
57
- try {
58
- const existingUser = this.findCachedUserByEmail(this.Email);
59
- if (existingUser) {
60
- // Never link a Person to the system user — modifying the system
61
- // user record via syncUserRecord would corrupt the MJ environment.
62
- if (this.isSystemUser(existingUser.ID)) {
63
- LogError(`PersonEntityServer: Blocked auto-link of Person (email=${this.Email}) ` +
64
- `to the MJ system user — the system user must not be linked to a Person`);
65
- return;
66
- }
67
- this.LinkedUserID = existingUser.ID;
68
- }
69
- else {
70
- const newUserID = await this.createUser();
71
- if (newUserID) {
72
- this.LinkedUserID = newUserID;
73
- }
74
- }
75
- }
76
- catch (error) {
77
- LogError(`PersonEntityServer: Failed to auto-link User for email ${this.Email}: ${error}`);
78
- // Don't block save — User linking is best-effort
79
- }
80
- }
81
39
  /**
82
40
  * Find an existing MJ User by email using the cached UserCache.
83
- * UserCache is populated at server startup and refreshed periodically.
41
+ * Retained as a helper for downstream subclasses; not called by this class.
84
42
  */
85
43
  findCachedUserByEmail(email) {
86
44
  const normalizedEmail = email.toLowerCase();
87
45
  return UserCache.Users.find(u => u.Email.toLowerCase() === normalizedEmail);
88
46
  }
89
- /**
90
- * Create a new MJ User record from the Person's details.
91
- * Returns the new User ID, or null on failure.
92
- */
93
- async createUser() {
94
- try {
95
- const md = new Metadata();
96
- const user = await md.GetEntityObject('MJ: Users', this.ContextCurrentUser);
97
- user.NewRecord();
98
- const fullName = this.buildFullName();
99
- user.Name = fullName;
100
- user.FirstName = this.FirstName;
101
- user.LastName = this.LastName;
102
- user.Email = this.Email;
103
- user.Type = 'User';
104
- user.IsActive = true;
105
- const saved = await user.Save();
106
- if (!saved) {
107
- LogError(`PersonEntityServer: Failed to save new User for ${this.Email}`);
108
- return null;
109
- }
110
- // Assign default "UI" role to the new user
111
- await this.assignDefaultUserRole(user.ID);
112
- return user.ID;
113
- }
114
- catch (error) {
115
- LogError(`PersonEntityServer: Error creating User for ${this.Email}: ${error}`);
116
- return null;
117
- }
118
- }
119
- /**
120
- * Assign the default MJ "UI" role to a User via the UserRole entity.
121
- * Uses Metadata.Roles (cached) for role lookup instead of a DB query.
122
- */
123
- async assignDefaultUserRole(userID) {
124
- try {
125
- const md = new Metadata();
126
- const role = md.Roles.find(r => r.Name.toLowerCase() === DEFAULT_MJ_ROLE_NAME.toLowerCase());
127
- if (!role) {
128
- LogError(`PersonEntityServer: MJ Role '${DEFAULT_MJ_ROLE_NAME}' not found in Metadata.Roles — cannot assign default UserRole`);
129
- return;
130
- }
131
- // Check if the user already has this role via UserCache
132
- const cachedUser = UserCache.Users.find(u => u.ID === userID);
133
- if (cachedUser?.UserRoles?.find(ur => ur.RoleID === role.ID)) {
134
- return; // Already has this role
135
- }
136
- const userRole = await md.GetEntityObject('MJ: User Roles', this.ContextCurrentUser);
137
- userRole.NewRecord();
138
- userRole.UserID = userID;
139
- userRole.RoleID = role.ID;
140
- const saved = await userRole.Save();
141
- if (!saved) {
142
- LogError(`PersonEntityServer: Failed to assign '${DEFAULT_MJ_ROLE_NAME}' role to User ${userID}`);
143
- }
144
- }
145
- catch (error) {
146
- LogError(`PersonEntityServer: Error assigning default UserRole: ${error}`);
147
- }
148
- }
149
- /**
150
- * Sync Person name/email changes to the linked MJ User record.
151
- * Called post-save — updates name/email fields and ensures the
152
- * bidirectional back-pointer (LinkedEntityID / LinkedEntityRecordID) is set.
153
- */
154
- async syncUserRecord(isNewRecord, emailChanged) {
155
- // SAFETY: Never modify the system user record. This prevents corruption
156
- // of the MJ environment if a Person is accidentally linked to the system user.
157
- if (this.LinkedUserID && this.isSystemUser(this.LinkedUserID)) {
158
- LogError(`PersonEntityServer: Blocked syncUserRecord for Person (email=${this.Email}) — ` +
159
- `LinkedUserID points to the MJ system user, which must never be modified via Person sync`);
160
- return;
161
- }
162
- const nameFields = ['FirstName', 'LastName', 'MiddleName', 'Prefix', 'Suffix'];
163
- const nameChanged = nameFields.some(f => this.GetFieldByName(f)?.Dirty === true);
164
- // For existing records with no field changes and no back-pointer work, skip
165
- if (!isNewRecord && !nameChanged && !emailChanged) {
166
- return;
167
- }
168
- try {
169
- const md = new Metadata();
170
- const user = await md.GetEntityObject('MJ: Users', this.ContextCurrentUser);
171
- const loaded = await user.Load(this.LinkedUserID);
172
- if (!loaded) {
173
- LogError(`PersonEntityServer: Could not load linked User ${this.LinkedUserID} for sync`);
174
- return;
175
- }
176
- if (nameChanged || isNewRecord) {
177
- user.Name = this.buildFullName();
178
- user.FirstName = this.FirstName;
179
- user.LastName = this.LastName;
180
- }
181
- if (emailChanged && this.Email) {
182
- user.Email = this.Email;
183
- }
184
- // Ensure bidirectional link: User → Person
185
- this.setUserBackPointer(user);
186
- const saved = await user.Save();
187
- if (!saved) {
188
- LogError(`PersonEntityServer: Failed to sync User ${this.LinkedUserID} after Person update`);
189
- }
190
- }
191
- catch (error) {
192
- LogError(`PersonEntityServer: Error syncing User record: ${error}`);
193
- // Don't block — sync is best-effort
194
- }
195
- }
196
- /**
197
- * Set the back-pointer fields on the User so the User → Person
198
- * relationship is bidirectional. Only sets fields if not already populated.
199
- */
200
- setUserBackPointer(user) {
201
- if (user.LinkedEntityRecordID) {
202
- return; // Already linked — nothing to do
203
- }
204
- user.LinkedRecordType = 'Person';
205
- user.LinkedEntityID = this.EntityInfo.ID;
206
- user.LinkedEntityRecordID = this.ID;
207
- }
208
- /**
209
- * Deactivate the linked User on Person deletion.
210
- * Sets IsActive=false rather than deleting, to preserve audit history.
211
- */
212
- async deactivateLinkedUser() {
213
- try {
214
- const md = new Metadata();
215
- const user = await md.GetEntityObject('MJ: Users', this.ContextCurrentUser);
216
- const loaded = await user.Load(this.LinkedUserID);
217
- if (!loaded) {
218
- return;
219
- }
220
- if (user.IsActive) {
221
- user.IsActive = false;
222
- const saved = await user.Save();
223
- if (!saved) {
224
- LogError(`PersonEntityServer: Failed to deactivate User ${this.LinkedUserID}`);
225
- }
226
- }
227
- }
228
- catch (error) {
229
- LogError(`PersonEntityServer: Error deactivating linked User: ${error}`);
230
- }
231
- }
232
47
  /**
233
48
  * Build a display-friendly full name from Person fields.
49
+ * Retained as a helper for downstream subclasses; not called by this class.
234
50
  */
235
51
  buildFullName() {
236
52
  const parts = [];
@@ -243,7 +59,7 @@ let PersonEntityServer = class PersonEntityServer extends mjBizAppsCommonPersonE
243
59
  /**
244
60
  * Check if the given user ID is the MJ system user.
245
61
  * The system user is a special internal record that must never be modified
246
- * by Person lifecycle hooks — doing so corrupts the entire MJ environment.
62
+ * by person-related lifecycle code — doing so corrupts the MJ environment.
247
63
  */
248
64
  isSystemUser(userID) {
249
65
  const systemUserID = UserCache.Instance.SYSTEM_USER_ID;
@@ -1 +1 @@
1
- {"version":3,"file":"PersonEntityServer.js","sourceRoot":"","sources":["../src/PersonEntityServer.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAA0C,QAAQ,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AACxH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAElC;;;;;;;GAOG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,2BAA2B;IAEtD,KAAK,CAAC,IAAI,CAAC,OAA2B;QAC3C,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,UAAU,EAAE,KAAK,KAAK,IAAI,CAAC;QAChD,MAAM,aAAa,GAAG,WAAW,IAAI,YAAY,CAAC;QAElD,iCAAiC;QACjC,IAAI,aAAa,I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,OAAO,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,CAAC;CACJ,CAAA;AAjCY,kBAAkB;IAD9B,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;GAC1C,kBAAkB,CAiC9B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mj-biz-apps/common-core-entities-server",
3
3
  "type": "module",
4
- "version": "5.32.0",
4
+ "version": "5.33.0",
5
5
  "description": "Server-side entity subclasses for BizApps Common — lifecycle hooks for People, Organizations, etc.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -21,13 +21,13 @@
21
21
  "typescript": "^5.9.3"
22
22
  },
23
23
  "dependencies": {
24
- "@mj-biz-apps/common-entities": "5.32.0"
24
+ "@mj-biz-apps/common-entities": "5.33.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@memberjunction/core": "^5.44.0",
28
- "@memberjunction/core-entities": "^5.44.0",
29
- "@memberjunction/global": "^5.44.0",
30
- "@memberjunction/sqlserver-dataprovider": "^5.44.0"
27
+ "@memberjunction/core": "^5.51.0",
28
+ "@memberjunction/core-entities": "^5.51.0",
29
+ "@memberjunction/global": "^5.51.0",
30
+ "@memberjunction/sqlserver-dataprovider": "^5.51.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",