@acorex-platform/module-security-management-client 0.0.15 → 0.0.21

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.
Files changed (16) hide show
  1. package/fesm2022/acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-jSDkyMMZ.mjs +2088 -0
  2. package/fesm2022/acorex-platform-module-security-management-client-acorex-platform-module-security-management-client-jSDkyMMZ.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-security-management-client-contracts.mjs +158 -1677
  4. package/fesm2022/acorex-platform-module-security-management-client-contracts.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-module-security-management-client-index-DOHWBEzM.mjs +462 -0
  6. package/fesm2022/acorex-platform-module-security-management-client-index-DOHWBEzM.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-security-management-client-send-password-reset-email.command-CoQgWdya.mjs +81 -0
  8. package/fesm2022/acorex-platform-module-security-management-client-send-password-reset-email.command-CoQgWdya.mjs.map +1 -0
  9. package/fesm2022/{acorex-platform-module-security-management-client-terminate-session.command-CKq-4Z4O.mjs → acorex-platform-module-security-management-client-terminate-session.command-dsU7scOK.mjs} +19 -12
  10. package/fesm2022/acorex-platform-module-security-management-client-terminate-session.command-dsU7scOK.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-security-management-client.mjs +1 -1704
  12. package/fesm2022/acorex-platform-module-security-management-client.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/types/acorex-platform-module-security-management-client-contracts.d.ts +208 -33
  15. package/types/acorex-platform-module-security-management-client.d.ts +139 -35
  16. package/fesm2022/acorex-platform-module-security-management-client-terminate-session.command-CKq-4Z4O.mjs.map +0 -1
@@ -1,11 +1,13 @@
1
- import { AXPWidgetsCatalog, AXPWidgetsList } from '@acorex-platform/framework-shared/core';
2
- import { createAllQueryView, AXPEntityCommandScope, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
-
4
- //#region ---- Datasource keys ----
5
- /** Security Management datasource registry names. */
6
- const AXMSecurityManagementDataSourceKeys = {
7
- Users: 'users',
8
- };
1
+ //#region ---- User context definitions ----
2
+ const AXM_SECURITY_CONTEXT_DEFINITIONS = [
3
+ {
4
+ name: 'userDisplayName',
5
+ title: 'User display name',
6
+ description: 'Human-readable name of the signed-in user (name or title from session). Used for personalized responses.',
7
+ order: 11,
8
+ capabilities: ['ai'],
9
+ },
10
+ ];
9
11
  //#endregion
10
12
 
11
13
  //#region ---- Feature Keys ----
@@ -19,6 +21,8 @@ const AXPSecurityManagementFeatureKeys = {
19
21
  MaxTotalUsers: 'SecurityManagement:Feature:MaxTotalUsers',
20
22
  ManageSessions: 'SecurityManagement:Feature:ManageSessions',
21
23
  ManagePolicies: 'SecurityManagement:Feature:ManagePolicies',
24
+ /** Platform Console only — Identity Provider management menu + CRUD. */
25
+ ManageIdentityProviders: 'SecurityManagement:Feature:ManageIdentityProviders',
22
26
  };
23
27
  //#endregion
24
28
 
@@ -28,39 +32,73 @@ const AXPSecurityManagementMenuKeys = {
28
32
  Roles: 'SecurityManagement:Menu:Roles',
29
33
  DeviceSessions: 'SecurityManagement:Menu:DeviceSessions',
30
34
  Policy: 'SecurityManagement:Menu:Policy',
35
+ IdentityProviders: 'SecurityManagement:Menu:IdentityProviders',
31
36
  MyProfile: 'SecurityManagement:Menu:MyProfile',
32
37
  };
33
38
 
34
- //#region ---- Permission Keys ----
39
+ /**
40
+ * Administration capabilities used by this module.
41
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
42
+ */
43
+ const AXPAdministrationPermissionKeys = {
44
+ Access: 'Administration:Permission:Access',
45
+ /** Create and maintain users, roles, role assignments, and related security-access reports. */
46
+ MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',
47
+ ManageSessions: 'Administration:Permission:ManageSessions',
48
+ MaintainPolicies: 'Administration:Permission:MaintainPolicies',
49
+ ViewIntegrations: 'Administration:Permission:ViewIntegrations',
50
+ MaintainConnections: 'Administration:Permission:MaintainConnections',
51
+ ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',
52
+ MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',
53
+ ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',
54
+ ViewRules: 'Administration:Permission:ViewRules',
55
+ MaintainRules: 'Administration:Permission:MaintainRules',
56
+ ManageRuleActions: 'Administration:Permission:ManageRuleActions',
57
+ MaintainAi: 'Administration:Permission:MaintainAi',
58
+ UseAiAssist: 'Administration:Permission:UseAiAssist',
59
+ MaintainDashboards: 'Administration:Permission:MaintainDashboards',
60
+ ViewJobs: 'Administration:Permission:ViewJobs',
61
+ ManageJobActions: 'Administration:Permission:ManageJobActions',
62
+ ViewObservability: 'Administration:Permission:ViewObservability',
63
+ MaintainObservability: 'Administration:Permission:MaintainObservability',
64
+ };
65
+ /**
66
+ * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
67
+ * Legacy nested shape kept so existing imports compile during migration.
68
+ */
35
69
  const AXPSecurityManagementPermissionKeys = {
36
70
  User: {
37
- Management: 'SecurityManagement:Permission:User.Management',
38
- View: 'SecurityManagement:Permission:User.View',
39
- Edit: 'SecurityManagement:Permission:User.Edit',
40
- Delete: 'SecurityManagement:Permission:User.Delete',
41
- Create: 'SecurityManagement:Permission:User.Create',
71
+ Management: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
72
+ View: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
73
+ Edit: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
74
+ Delete: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
75
+ Create: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
42
76
  },
43
77
  Role: {
44
- Management: 'SecurityManagement:Permission:Role.Management',
45
- View: 'SecurityManagement:Permission:Role.View',
46
- Edit: 'SecurityManagement:Permission:Role.Edit',
47
- Delete: 'SecurityManagement:Permission:Role.Delete',
48
- Create: 'SecurityManagement:Permission:Role.Create',
78
+ Management: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
79
+ View: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
80
+ Edit: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
81
+ Delete: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
82
+ Create: AXPAdministrationPermissionKeys.MaintainUsersAndRoles,
49
83
  },
50
84
  DeviceSession: {
51
- Management: 'SecurityManagement:Permission:DeviceSession.Management',
52
- View: 'SecurityManagement:Permission:DeviceSession.View',
53
- Terminate: 'SecurityManagement:Permission:DeviceSession.Terminate',
85
+ Management: AXPAdministrationPermissionKeys.ManageSessions,
86
+ View: AXPAdministrationPermissionKeys.ManageSessions,
87
+ Terminate: AXPAdministrationPermissionKeys.ManageSessions,
54
88
  },
55
89
  Policy: {
56
- Management: 'SecurityManagement:Permission:Policy.Management',
57
- View: 'SecurityManagement:Permission:Policy.View',
58
- Edit: 'SecurityManagement:Permission:Policy.Edit',
59
- Delete: 'SecurityManagement:Permission:Policy.Delete',
60
- Create: 'SecurityManagement:Permission:Policy.Create',
90
+ Management: AXPAdministrationPermissionKeys.MaintainPolicies,
91
+ View: AXPAdministrationPermissionKeys.MaintainPolicies,
92
+ Edit: AXPAdministrationPermissionKeys.MaintainPolicies,
93
+ Delete: AXPAdministrationPermissionKeys.MaintainPolicies,
94
+ Create: AXPAdministrationPermissionKeys.MaintainPolicies,
61
95
  },
62
96
  };
63
- //#endregion
97
+
98
+ /** Component key for the Role permissions page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */
99
+ const ROLE_PERMISSIONS_PAGE_COMPONENT_KEY = 'role-permissions-page';
100
+
101
+ const USER_ROLES_PAGE_COMPONENT_KEY = 'user-roles-page';
64
102
 
65
103
  const config = {
66
104
  i18n: 'security-management',
@@ -99,12 +137,39 @@ const RootConfig = {
99
137
  titlePlural: `@${config.i18n}:roles.entities.role.plural`,
100
138
  icon: 'fa-light fa-user-tag',
101
139
  },
140
+ rolePermission: {
141
+ name: 'RolePermission',
142
+ title: `@${config.i18n}:role-permissions.entities.role-permission.title`,
143
+ titlePlural: `@${config.i18n}:role-permissions.entities.role-permission.plural`,
144
+ icon: 'fa-light fa-key',
145
+ },
146
+ userRole: {
147
+ name: 'UserRole',
148
+ title: `@${config.i18n}:user-roles.entities.user-role.title`,
149
+ titlePlural: `@${config.i18n}:user-roles.entities.user-role.plural`,
150
+ icon: 'fa-light fa-user-tag',
151
+ },
102
152
  profile: {
103
153
  name: 'Profile',
104
154
  title: `@${config.i18n}:profile.entities.profile.title`,
105
155
  titlePlural: `@${config.i18n}:profile.entities.profile.plural`,
106
156
  icon: 'fa-light fa-user',
107
157
  },
158
+ identityProvider: {
159
+ name: 'IdentityProvider',
160
+ title: `@${config.i18n}:identity-providers.entities.identity-provider.title`,
161
+ titlePlural: `@${config.i18n}:identity-providers.entities.identity-provider.plural`,
162
+ icon: 'fa-light fa-id-badge',
163
+ },
164
+ },
165
+ queries: {
166
+ reports: {
167
+ getUserEffectiveRolesHistory: 'SecurityManagement:Reports:GetUserEffectiveRolesHistory',
168
+ getUserEffectivePermissionsHistory: 'SecurityManagement:Reports:GetUserEffectivePermissionsHistory',
169
+ getRoleHoldersHistory: 'SecurityManagement:Reports:GetRoleHoldersHistory',
170
+ getPermissionHoldersHistory: 'SecurityManagement:Reports:GetPermissionHoldersHistory',
171
+ getUserPasswordChangeHistory: 'SecurityManagement:Reports:GetUserPasswordChangeHistory',
172
+ },
108
173
  },
109
174
  };
110
175
 
@@ -143,475 +208,65 @@ var AXMUserEffectiveState;
143
208
  })(AXMUserEffectiveState || (AXMUserEffectiveState = {}));
144
209
  //#endregion
145
210
 
146
- async function deviceSessionsFactory() {
147
- const i18n = RootConfig.config.i18n;
148
- const entityDef = {
149
- module: RootConfig.module.name,
150
- name: RootConfig.entities.deviceSessions.name,
151
- title: RootConfig.entities.deviceSessions.title,
152
- icon: RootConfig.entities.deviceSessions.icon,
153
- formats: {
154
- individual: RootConfig.entities.deviceSessions.title,
155
- plural: RootConfig.entities.deviceSessions.titlePlural,
156
- searchResult: {
157
- title: '{{ title }}',
158
- description: RootConfig.module.title,
159
- },
160
- },
161
- plugins: [{ name: 'compare' }],
162
- groups: [
163
- {
164
- id: 'basic-info',
165
- title: `@general:terms.interface.basic-info`,
166
- },
167
- {
168
- id: 'device',
169
- title: `@${i18n}:sessions.entities.session.groups.device`,
170
- },
171
- {
172
- id: 'session',
173
- title: `@${i18n}:sessions.entities.session.groups.session`,
174
- },
175
- ],
176
- properties: [
177
- {
178
- name: 'tenant.name',
179
- title: '@security-management:sessions.entities.session.fields.tenant.title',
180
- groupId: 'basic-info',
181
- options: {
182
- sort: {
183
- enabled: true,
184
- },
185
- filter: {
186
- inline: {
187
- enabled: true,
188
- },
189
- advance: {
190
- enabled: true,
191
- },
192
- },
193
- },
194
- schema: {
195
- dataType: 'string',
196
- interface: {
197
- type: AXPWidgetsCatalog.text,
198
- },
199
- },
200
- validations: [
201
- {
202
- rule: 'required',
203
- },
204
- ],
205
- },
206
- {
207
- name: 'user.name',
208
- title: '@security-management:sessions.entities.session.fields.user.title',
209
- groupId: 'basic-info',
210
- options: {
211
- sort: {
212
- enabled: true,
213
- },
214
- filter: {
215
- inline: {
216
- enabled: true,
217
- },
218
- advance: {
219
- enabled: true,
220
- },
221
- },
222
- },
223
- schema: {
224
- dataType: 'string',
225
- interface: {
226
- type: AXPWidgetsCatalog.text,
227
- },
228
- },
229
- validations: [
230
- {
231
- rule: 'required',
232
- },
233
- ],
234
- },
235
- {
236
- name: 'application.name',
237
- title: '@security-management:sessions.entities.session.fields.application.title',
238
- groupId: 'basic-info',
239
- options: {
240
- sort: {
241
- enabled: true,
242
- },
243
- filter: {
244
- inline: {
245
- enabled: true,
246
- },
247
- advance: {
248
- enabled: true,
249
- },
250
- },
251
- },
252
- schema: {
253
- dataType: 'string',
254
- interface: {
255
- type: AXPWidgetsCatalog.text,
256
- },
257
- },
258
- validations: [
259
- {
260
- rule: 'required',
261
- },
262
- ],
263
- },
264
- {
265
- name: 'clientName',
266
- title: '@security-management:sessions.entities.session.fields.client-name.title',
267
- groupId: 'basic-info',
268
- options: {
269
- sort: {
270
- enabled: true,
271
- },
272
- filter: {
273
- inline: {
274
- enabled: true,
275
- },
276
- advance: {
277
- enabled: true,
278
- },
279
- },
280
- },
281
- schema: {
282
- dataType: 'string',
283
- interface: {
284
- type: AXPWidgetsCatalog.text,
285
- },
286
- },
287
- validations: [
288
- {
289
- rule: 'required',
290
- },
291
- ],
292
- },
293
- {
294
- name: 'location',
295
- title: '@security-management:sessions.entities.session.fields.location.title',
296
- groupId: 'device',
297
- options: {
298
- sort: {
299
- enabled: true,
300
- },
301
- filter: {
302
- inline: {
303
- enabled: true,
304
- },
305
- advance: {
306
- enabled: true,
307
- },
308
- },
309
- },
310
- schema: {
311
- dataType: 'string',
312
- interface: {
313
- type: AXPWidgetsCatalog.text,
314
- },
315
- },
316
- validations: [
317
- {
318
- rule: 'required',
319
- },
320
- ],
321
- },
322
- {
323
- name: 'ipAddress',
324
- title: '@security-management:sessions.entities.session.fields.ip-address.title',
325
- groupId: 'device',
326
- options: {
327
- sort: {
328
- enabled: true,
329
- },
330
- filter: {
331
- inline: {
332
- enabled: true,
333
- },
334
- advance: {
335
- enabled: true,
336
- },
337
- },
338
- },
339
- schema: {
340
- dataType: 'string',
341
- interface: {
342
- type: AXPWidgetsCatalog.text,
343
- },
344
- },
345
- validations: [
346
- {
347
- rule: 'required',
348
- },
349
- ],
350
- },
351
- {
352
- name: 'lastLoginDate',
353
- title: '@security-management:sessions.entities.session.fields.last-login-date.title',
354
- groupId: 'session',
355
- options: {
356
- sort: {
357
- enabled: true,
358
- },
359
- filter: {
360
- inline: {
361
- enabled: true,
362
- },
363
- advance: {
364
- enabled: true,
365
- },
366
- },
367
- },
368
- schema: {
369
- dataType: 'dateTime',
370
- interface: {
371
- type: AXPWidgetsCatalog.dateTime,
372
- options: {
373
- format: 'MM/DD/YYYY hh:mm a',
374
- },
375
- },
376
- },
377
- validations: [
378
- {
379
- rule: 'required',
380
- },
381
- ],
382
- },
383
- {
384
- name: 'operatingSystem',
385
- title: '@security-management:sessions.entities.session.fields.operating-system.title',
386
- groupId: 'device',
387
- options: {
388
- sort: {
389
- enabled: true,
390
- },
391
- filter: {
392
- inline: {
393
- enabled: true,
394
- },
395
- advance: {
396
- enabled: true,
397
- },
398
- },
399
- },
400
- schema: {
401
- dataType: 'string',
402
- interface: {
403
- type: AXPWidgetsCatalog.text,
404
- },
405
- },
406
- validations: [
407
- {
408
- rule: 'required',
409
- },
410
- ],
411
- },
412
- {
413
- name: 'deviceName',
414
- title: '@security-management:sessions.entities.session.fields.device-name.title',
415
- groupId: 'device',
416
- options: {
417
- sort: {
418
- enabled: true,
419
- },
420
- filter: {
421
- inline: {
422
- enabled: true,
423
- },
424
- advance: {
425
- enabled: true,
426
- },
427
- },
428
- },
429
- schema: {
430
- dataType: 'string',
431
- interface: {
432
- type: AXPWidgetsCatalog.text,
433
- },
434
- },
435
- validations: [
436
- {
437
- rule: 'required',
438
- },
439
- ],
440
- },
441
- ],
442
- columns: [
443
- { name: 'tenant.name' },
444
- { name: 'user.name' },
445
- { name: 'application.name' },
446
- { name: 'clientName' },
447
- { name: 'location' },
448
- { name: 'deviceName' },
449
- { name: 'lastLoginDate' },
450
- { name: 'operatingSystem' },
451
- ],
452
- interfaces: {
453
- master: {
454
- single: {
455
- title: '{{user.name}}',
456
- sections: [
457
- {
458
- id: 'session',
459
- layout: {
460
- positions: {
461
- lg: {
462
- colSpan: 12,
463
- },
464
- },
465
- },
466
- },
467
- {
468
- id: 'section',
469
- layout: {
470
- positions: {
471
- lg: {
472
- colSpan: 12,
473
- },
474
- },
475
- },
476
- },
477
- {
478
- id: 'device',
479
- layout: {
480
- positions: {
481
- lg: {
482
- colSpan: 12,
483
- },
484
- },
485
- },
486
- },
487
- ],
488
- properties: [
489
- {
490
- name: 'tenant.name',
491
- layout: {
492
- positions: {
493
- lg: {
494
- colSpan: 6,
495
- },
496
- },
497
- },
498
- },
499
- {
500
- name: 'user.name',
501
- layout: {
502
- positions: {
503
- lg: {
504
- colSpan: 6,
505
- },
506
- },
507
- },
508
- },
509
- {
510
- name: 'application.name',
511
- layout: {
512
- positions: {
513
- lg: {
514
- colSpan: 6,
515
- },
516
- },
517
- },
518
- },
519
- {
520
- name: 'clientName',
521
- layout: {
522
- positions: {
523
- lg: {
524
- colSpan: 6,
525
- },
526
- },
527
- },
528
- },
529
- {
530
- name: 'location',
531
- layout: {
532
- positions: {
533
- lg: {
534
- colSpan: 6,
535
- },
536
- },
537
- },
538
- },
539
- {
540
- name: 'ipAddress',
541
- layout: {
542
- positions: {
543
- lg: {
544
- colSpan: 6,
545
- },
546
- },
547
- },
548
- },
549
- {
550
- name: 'lastLoginDate',
551
- layout: {
552
- positions: {
553
- lg: {
554
- colSpan: 6,
555
- },
556
- },
557
- },
558
- },
559
- {
560
- name: 'operatingSystem',
561
- layout: {
562
- positions: {
563
- lg: {
564
- colSpan: 6,
565
- },
566
- },
567
- },
568
- },
569
- {
570
- name: 'deviceName',
571
- layout: {
572
- positions: {
573
- lg: {
574
- colSpan: 6,
575
- },
576
- },
577
- },
578
- },
579
- ],
580
- actions: [
581
- {
582
- title: '@security-management:sessions.permissions.device-sessions.actions.terminate.title',
583
- command: 'Session:Terminate',
584
- priority: 'primary',
585
- type: 'delete',
586
- scope: AXPEntityCommandScope.Individual,
587
- },
588
- ],
589
- },
590
- list: {
591
- actions: [
592
- ...entityMasterCrudActions({ create: false, delete: false }),
593
- {
594
- title: '@security-management:sessions.permissions.device-sessions.actions.terminate.title',
595
- command: 'Session:Terminate',
596
- priority: 'primary',
597
- type: 'delete',
598
- scope: AXPEntityCommandScope.Selected,
599
- },
600
- {
601
- title: '@security-management:sessions.permissions.device-sessions.actions.terminate.title',
602
- command: 'Session:Terminate',
603
- priority: 'secondary',
604
- type: 'delete',
605
- scope: AXPEntityCommandScope.Individual,
606
- },
607
- ],
608
- views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
609
- },
610
- },
611
- },
612
- };
613
- return entityDef;
211
+ //#region ---- Resolve effective state ----
212
+ const AccountLifecycleState = {
213
+ Active: 'active',
214
+ Archived: 'archived',
215
+ Pending: 'pending',
216
+ Inactive: 'inactive',
217
+ Suspended: 'suspended',
218
+ };
219
+ /**
220
+ * Derives the unified operational state from account lifecycle and sign-in gate.
221
+ * Used for persisted `effectiveState` on SecurityManagement.User.
222
+ */
223
+ function resolveAXMUserEffectiveState(input) {
224
+ const lifecycle = input.accountState;
225
+ const auth = (input.accessState ?? AXMUserAccessState.Allowed);
226
+ if (lifecycle === AccountLifecycleState.Archived) {
227
+ return AXMUserEffectiveState.Archived;
228
+ }
229
+ if (lifecycle === AccountLifecycleState.Pending) {
230
+ return AXMUserEffectiveState.Pending;
231
+ }
232
+ if (lifecycle === AccountLifecycleState.Inactive) {
233
+ return AXMUserEffectiveState.Inactive;
234
+ }
235
+ if (lifecycle === AccountLifecycleState.Suspended) {
236
+ return AXMUserEffectiveState.Suspended;
237
+ }
238
+ if (auth === AXMUserAccessState.Expired) {
239
+ return AXMUserEffectiveState.CredentialExpired;
240
+ }
241
+ if (auth === AXMUserAccessState.Blocked) {
242
+ return AXMUserEffectiveState.SignInBlocked;
243
+ }
244
+ if (lifecycle === AccountLifecycleState.Active) {
245
+ return AXMUserEffectiveState.Active;
246
+ }
247
+ return AXMUserEffectiveState.Active;
614
248
  }
249
+ //#endregion
250
+
251
+ //#region ---- Password reset payload on User ----
252
+ //#endregion
253
+
254
+ //#region ---- Security management server command keys ----
255
+ const AXMSecurityManagementServerCommands = {
256
+ SendPasswordResetEmail: 'SecurityManagement:Server:SendPasswordResetEmail',
257
+ CompletePasswordReset: 'SecurityManagement:Server:CompletePasswordReset',
258
+ ChangeOwnPassword: 'SecurityManagement:Server:ChangeOwnPassword',
259
+ };
260
+ /** Stable codes for self-service password change (client maps to i18n). */
261
+ const AXM_CHANGE_OWN_PASSWORD_ERROR_CODES = {
262
+ NotSignedIn: 'CHANGE_OWN_PASSWORD_NOT_SIGNED_IN',
263
+ IncorrectCurrent: 'CHANGE_OWN_PASSWORD_INCORRECT_CURRENT',
264
+ SameAsCurrent: 'CHANGE_OWN_PASSWORD_SAME_AS_CURRENT',
265
+ InvalidInput: 'CHANGE_OWN_PASSWORD_INVALID_INPUT',
266
+ };
267
+ /** Client/UI action key (confirm dialog → server send). */
268
+ const AXM_USER_SEND_PASSWORD_RESET_COMMAND = 'SecurityManagement:User:SendPasswordResetEmail';
269
+ //#endregion
615
270
 
616
271
  var AXMSessionStatusTypes;
617
272
  (function (AXMSessionStatusTypes) {
@@ -620,207 +275,8 @@ var AXMSessionStatusTypes;
620
275
  AXMSessionStatusTypes["active"] = "active";
621
276
  })(AXMSessionStatusTypes || (AXMSessionStatusTypes = {}));
622
277
 
623
- async function policyFactory() {
624
- const i18n = RootConfig.config.i18n;
625
- const entityDef = {
626
- module: RootConfig.module.name,
627
- name: RootConfig.entities.policy.name,
628
- title: RootConfig.entities.policy.title,
629
- icon: RootConfig.entities.policy.icon,
630
- formats: {
631
- individual: RootConfig.entities.policy.title,
632
- plural: RootConfig.entities.policy.titlePlural,
633
- searchResult: {
634
- title: '{{ title }}',
635
- description: RootConfig.module.title,
636
- },
637
- },
638
- plugins: [{ name: 'history' }, { name: 'lock' }, { name: 'compare' }, { name: 'archive' }],
639
- relatedEntities: [],
640
- groups: [
641
- {
642
- id: 'basic-info',
643
- title: `@general:terms.interface.basic-info`,
644
- },
645
- ],
646
- properties: [
647
- {
648
- name: 'name',
649
- title: '@general:terms.common.name',
650
- groupId: 'basic-info',
651
- options: {
652
- sort: {
653
- enabled: true,
654
- },
655
- filter: {
656
- advance: {
657
- enabled: true,
658
- },
659
- inline: {
660
- enabled: false,
661
- },
662
- },
663
- },
664
- schema: {
665
- dataType: 'string',
666
- interface: {
667
- type: AXPWidgetsCatalog.text,
668
- },
669
- },
670
- validations: [
671
- {
672
- rule: 'required',
673
- },
674
- ],
675
- },
676
- {
677
- name: 'title',
678
- title: '@general:terms.common.title',
679
- groupId: 'basic-info',
680
- options: {
681
- sort: {
682
- enabled: true,
683
- },
684
- filter: {
685
- advance: {
686
- enabled: true,
687
- },
688
- inline: {
689
- enabled: false,
690
- },
691
- },
692
- },
693
- schema: {
694
- dataType: 'string',
695
- interface: {
696
- type: AXPWidgetsCatalog.text,
697
- },
698
- },
699
- validations: [
700
- {
701
- rule: 'required',
702
- },
703
- ],
704
- },
705
- ],
706
- columns: [{ name: 'name' }, { name: 'title' }],
707
- interfaces: {
708
- master: {
709
- create: {
710
- sections: [
711
- {
712
- id: 'section',
713
- },
714
- ],
715
- properties: [
716
- {
717
- name: 'name',
718
- layout: {
719
- positions: {
720
- lg: {
721
- colSpan: 6,
722
- order: 1,
723
- },
724
- },
725
- },
726
- },
727
- {
728
- name: 'title',
729
- layout: {
730
- positions: {
731
- lg: {
732
- colSpan: 6,
733
- order: 2,
734
- },
735
- },
736
- },
737
- },
738
- ],
739
- },
740
- update: {
741
- sections: [
742
- {
743
- id: 'section',
744
- },
745
- ],
746
- properties: [
747
- {
748
- name: 'name',
749
- layout: {
750
- positions: {
751
- lg: {
752
- colSpan: 6,
753
- order: 1,
754
- },
755
- },
756
- },
757
- },
758
- {
759
- name: 'title',
760
- layout: {
761
- positions: {
762
- lg: {
763
- colSpan: 6,
764
- order: 2,
765
- },
766
- },
767
- },
768
- },
769
- ],
770
- },
771
- single: {
772
- title: '{{title}}',
773
- sections: [
774
- {
775
- id: 'section',
776
- layout: {
777
- positions: {
778
- lg: {
779
- colSpan: 12,
780
- },
781
- },
782
- },
783
- },
784
- ],
785
- properties: [
786
- {
787
- name: 'name',
788
- layout: {
789
- positions: {
790
- lg: {
791
- colSpan: 6,
792
- order: 1,
793
- },
794
- },
795
- },
796
- },
797
- {
798
- name: 'title',
799
- layout: {
800
- positions: {
801
- lg: {
802
- colSpan: 6,
803
- order: 2,
804
- },
805
- },
806
- },
807
- },
808
- ],
809
- actions: [...entityMasterRecordActions()],
810
- },
811
- list: {
812
- actions: [...entityMasterCrudActions()],
813
- views: [
814
- createAllQueryView({
815
- sorts: [{ name: 'name', dir: 'asc' }],
816
- }),
817
- ],
818
- },
819
- },
820
- },
821
- };
822
- return entityDef;
823
- }
278
+ //#region ---- Identity provider entity model ----
279
+ //#endregion
824
280
 
825
281
  // const glocbal_readonly_policy = {
826
282
  // name: 'readonly',
@@ -863,986 +319,11 @@ async function policyFactory() {
863
319
  // ],
864
320
  // } as AXMSecurityManagementPolicyEntityModel;
865
321
 
866
- async function profileFactory() {
867
- const i18n = RootConfig.config.i18n;
868
- const entityDef = {
869
- module: RootConfig.module.name,
870
- name: RootConfig.entities.profile.name,
871
- title: RootConfig.entities.profile.title,
872
- icon: RootConfig.entities.profile.icon,
873
- formats: {
874
- individual: RootConfig.entities.profile.title,
875
- plural: RootConfig.entities.profile.titlePlural,
876
- },
877
- plugins: [
878
- { name: 'history' },
879
- { name: 'lock' },
880
- { name: 'compare' },
881
- { name: 'archive' },
882
- ],
883
- relatedEntities: [],
884
- groups: [
885
- {
886
- id: 'basic-info',
887
- title: `@general:terms.interface.basic-info`,
888
- },
889
- {
890
- id: 'contact',
891
- title: `@${i18n}:contactInformation`,
892
- },
893
- {
894
- id: 'address',
895
- title: `@${i18n}:addressInformation`,
896
- },
897
- ],
898
- properties: [
899
- {
900
- name: 'id',
901
- title: "@general:terms.common.id",
902
- groupId: 'basic-info',
903
- schema: {
904
- dataType: 'string',
905
- interface: {
906
- type: AXPWidgetsCatalog.text,
907
- options: { readOnly: true },
908
- },
909
- },
910
- },
911
- {
912
- name: 'username',
913
- title: "@general:terms.contact.username",
914
- groupId: 'basic-info',
915
- schema: {
916
- dataType: 'string',
917
- interface: {
918
- type: AXPWidgetsCatalog.text,
919
- },
920
- },
921
- validations: [{ rule: 'required' }],
922
- },
923
- {
924
- name: 'firstName',
925
- title: "@general:terms.contact.first-name",
926
- groupId: 'basic-info',
927
- schema: {
928
- dataType: 'string',
929
- interface: {
930
- type: AXPWidgetsCatalog.text,
931
- },
932
- },
933
- validations: [{ rule: 'required' }],
934
- },
935
- {
936
- name: 'lastName',
937
- title: "@general:terms.contact.last-name",
938
- groupId: 'basic-info',
939
- schema: {
940
- dataType: 'string',
941
- interface: {
942
- type: AXPWidgetsCatalog.text,
943
- },
944
- },
945
- validations: [{ rule: 'required' }],
946
- },
947
- {
948
- name: 'nationalCode',
949
- title: "@security-management:profile.entities.profile.fields.national-code.title",
950
- groupId: 'basic-info',
951
- schema: {
952
- dataType: 'string',
953
- interface: {
954
- type: AXPWidgetsCatalog.text,
955
- },
956
- },
957
- validations: [
958
- { rule: 'required' },
959
- { rule: 'minLength', options: { value: 10 } },
960
- { rule: 'maxLength', options: { value: 10 } },
961
- ],
962
- },
963
- {
964
- name: 'password',
965
- title: "@security-management:profile.entities.profile.fields.password.title",
966
- groupId: 'basic-info',
967
- schema: {
968
- dataType: 'string',
969
- interface: {
970
- type: AXPWidgetsCatalog.password,
971
- },
972
- },
973
- validations: [{ rule: 'required' }],
974
- },
975
- ],
976
- columns: [],
977
- //TODO dd
978
- interfaces: {
979
- master: {
980
- create: {
981
- sections: [{ id: 'info' }],
982
- properties: [
983
- { name: 'id' },
984
- { name: 'username' },
985
- { name: 'firstName' },
986
- { name: 'lastName' },
987
- { name: 'nationalCode' },
988
- { name: 'password' },
989
- ],
990
- },
991
- update: {
992
- sections: [{ id: 'info' }],
993
- properties: [
994
- { name: 'id' },
995
- { name: 'username' },
996
- { name: 'firstName' },
997
- { name: 'lastName' },
998
- { name: 'nationalCode' },
999
- { name: 'password' },
1000
- ],
1001
- },
1002
- single: {
1003
- title: '{{ context.eval("firstName") + " " + context.eval("lastName") }}',
1004
- sections: [{ id: 'info' }],
1005
- properties: [
1006
- { name: 'id' },
1007
- { name: 'username' },
1008
- { name: 'firstName' },
1009
- { name: 'lastName' },
1010
- { name: 'nationalCode' },
1011
- { name: 'password' },
1012
- ],
1013
- actions: [...entityMasterRecordActions()],
1014
- },
1015
- list: {
1016
- actions: [
1017
- ...entityMasterCrudActions(),
1018
- ],
1019
- views: [createAllQueryView()],
1020
- },
1021
- },
1022
- },
1023
- };
1024
- return entityDef;
1025
- }
1026
-
1027
- async function rolesFactory() {
1028
- const i18n = RootConfig.config.i18n;
1029
- const entityDef = {
1030
- module: RootConfig.module.name,
1031
- name: RootConfig.entities.roles.name,
1032
- title: RootConfig.entities.roles.title,
1033
- icon: RootConfig.entities.roles.icon,
1034
- formats: {
1035
- individual: RootConfig.entities.roles.title,
1036
- plural: RootConfig.entities.roles.titlePlural,
1037
- },
1038
- plugins: [{ name: 'history' }, { name: 'lock' }, { name: 'compare' }, { name: 'archive' }],
1039
- relatedEntities: [],
1040
- groups: [
1041
- {
1042
- id: 'basic-info',
1043
- title: `@general:terms.interface.basic-info`,
1044
- },
1045
- {
1046
- id: 'permissions',
1047
- title: `@${i18n}:permissions-feature.terms.permissions`,
1048
- },
1049
- ],
1050
- properties: [
1051
- {
1052
- name: 'id',
1053
- title: `@general:terms.common.id`,
1054
- groupId: 'basic-info',
1055
- schema: {
1056
- dataType: 'string',
1057
- visible: false,
1058
- nullable: false,
1059
- readonly: true,
1060
- unique: {
1061
- enabled: true,
1062
- },
1063
- },
1064
- },
1065
- {
1066
- name: 'title',
1067
- title: `@general:terms.common.title`,
1068
- groupId: 'basic-info',
1069
- options: {
1070
- sort: {
1071
- enabled: true,
1072
- },
1073
- filter: {
1074
- advance: {
1075
- enabled: true,
1076
- },
1077
- inline: {
1078
- enabled: true,
1079
- },
1080
- },
1081
- },
1082
- schema: {
1083
- dataType: 'string',
1084
- interface: {
1085
- type: AXPWidgetsCatalog.text,
1086
- },
1087
- },
1088
- },
1089
- {
1090
- name: 'description',
1091
- title: `@general:terms.common.description`,
1092
- groupId: 'basic-info',
1093
- options: {
1094
- sort: {
1095
- enabled: true,
1096
- },
1097
- filter: {
1098
- advance: {
1099
- enabled: true,
1100
- },
1101
- },
1102
- },
1103
- schema: {
1104
- dataType: 'string',
1105
- interface: {
1106
- type: AXPWidgetsCatalog.largeText,
1107
- options: {
1108
- rows: 3,
1109
- },
1110
- },
1111
- },
1112
- },
1113
- {
1114
- name: 'permissions',
1115
- title: `@${i18n}:permissions-feature.terms.permissions`,
1116
- groupId: 'permissions',
1117
- schema: {
1118
- dataType: 'array',
1119
- interface: {
1120
- type: 'permissions-editor',
1121
- options: {
1122
- multiple: true,
1123
- },
1124
- },
1125
- },
1126
- },
1127
- ],
1128
- columns: [{ name: 'title' }, { name: 'description' }, { name: 'permissions' }],
1129
- interfaces: {
1130
- master: {
1131
- create: {
1132
- sections: [
1133
- {
1134
- id: 'basic-info',
1135
- },
1136
- {
1137
- id: 'permissions',
1138
- },
1139
- ],
1140
- properties: [
1141
- {
1142
- name: 'title',
1143
- layout: {
1144
- positions: {
1145
- lg: {
1146
- colSpan: 12,
1147
- },
1148
- },
1149
- },
1150
- },
1151
- {
1152
- name: 'permissions',
1153
- layout: {
1154
- label: {
1155
- visible: false,
1156
- },
1157
- positions: {
1158
- lg: {
1159
- colSpan: 12,
1160
- },
1161
- },
1162
- },
1163
- },
1164
- {
1165
- name: 'description',
1166
- layout: {
1167
- positions: {
1168
- lg: {
1169
- colSpan: 12,
1170
- },
1171
- },
1172
- },
1173
- },
1174
- ],
1175
- },
1176
- update: {
1177
- sections: [
1178
- {
1179
- id: 'basic-info',
1180
- },
1181
- {
1182
- id: 'permissions',
1183
- },
1184
- ],
1185
- properties: [
1186
- {
1187
- name: 'title',
1188
- layout: {
1189
- positions: {
1190
- lg: {
1191
- colSpan: 12,
1192
- },
1193
- },
1194
- },
1195
- },
1196
- {
1197
- name: 'description',
1198
- layout: {
1199
- positions: {
1200
- lg: {
1201
- colSpan: 12,
1202
- },
1203
- },
1204
- },
1205
- },
1206
- {
1207
- name: 'permissions',
1208
- layout: {
1209
- label: {
1210
- visible: false,
1211
- },
1212
- positions: {
1213
- lg: {
1214
- colSpan: 12,
1215
- },
1216
- },
1217
- },
1218
- },
1219
- ],
1220
- },
1221
- single: {
1222
- title: '{{title}}',
1223
- sections: [
1224
- {
1225
- id: 'basic-info',
1226
- layout: {
1227
- positions: {
1228
- lg: {
1229
- colSpan: 12,
1230
- },
1231
- },
1232
- },
1233
- },
1234
- {
1235
- id: 'permissions',
1236
- layout: {
1237
- positions: {
1238
- lg: {
1239
- colSpan: 12,
1240
- },
1241
- },
1242
- },
1243
- },
1244
- ],
1245
- properties: [
1246
- {
1247
- name: 'title',
1248
- layout: {
1249
- positions: {
1250
- lg: {
1251
- colSpan: 12,
1252
- },
1253
- },
1254
- },
1255
- },
1256
- {
1257
- name: 'permissions',
1258
- layout: {
1259
- label: {
1260
- visible: false,
1261
- },
1262
- positions: {
1263
- lg: {
1264
- colSpan: 12,
1265
- },
1266
- },
1267
- },
1268
- },
1269
- {
1270
- name: 'description',
1271
- layout: {
1272
- positions: {
1273
- lg: {
1274
- colSpan: 12,
1275
- },
1276
- },
1277
- },
1278
- },
1279
- ],
1280
- actions: [...entityMasterRecordActions()],
1281
- },
1282
- list: {
1283
- actions: [
1284
- ...entityMasterCrudActions(),
1285
- {
1286
- title: `@${i18n}:permissions-feature.actions.assign.title`,
1287
- command: 'assign-permissions',
1288
- priority: 'secondary',
1289
- type: 'view',
1290
- scope: AXPEntityCommandScope.Individual,
1291
- },
1292
- ],
1293
- views: [createAllQueryView()],
1294
- },
1295
- },
1296
- },
1297
- };
1298
- return entityDef;
1299
- }
322
+ //#region ----- RolePermission types -----
323
+ //#endregion
1300
324
 
1301
- async function usersFactory() {
1302
- const i18n = RootConfig.config.i18n;
1303
- const entityDef = {
1304
- module: RootConfig.module.name,
1305
- name: RootConfig.entities.users.name,
1306
- title: RootConfig.entities.users.title,
1307
- icon: RootConfig.entities.users.icon,
1308
- formats: {
1309
- individual: RootConfig.entities.users.title,
1310
- plural: RootConfig.entities.users.titlePlural,
1311
- searchResult: {
1312
- title: '{{ displayName }}',
1313
- description: `@security-management:users.entities.user.search-result-description`,
1314
- },
1315
- },
1316
- plugins: [
1317
- {
1318
- name: 'status',
1319
- options: {
1320
- definition: 'security-management.account-state.user',
1321
- field: 'accountState',
1322
- isPrimary: false,
1323
- groupId: 'user-account-access',
1324
- title: '@security-management:users.entities.user.fields.account-lifecycle.title',
1325
- showInCreate: false,
1326
- generate: { views: { enabled: false } },
1327
- },
1328
- },
1329
- {
1330
- name: 'status',
1331
- options: {
1332
- field: 'accessState',
1333
- definition: AXM_USER_ACCESS_STATE_DEFINITION_KEY,
1334
- isPrimary: false,
1335
- groupId: 'user-account-access',
1336
- title: '@security-management:users.entities.user.fields.access-state.title',
1337
- showInCreate: false,
1338
- readonly: false,
1339
- generate: { views: { enabled: false } },
1340
- },
1341
- },
1342
- {
1343
- name: 'status',
1344
- options: {
1345
- field: 'effectiveState',
1346
- definition: AXM_USER_EFFECTIVE_STATE_DEFINITION_KEY,
1347
- isPrimary: true,
1348
- groupId: 'user-account-access',
1349
- title: '@security-management:users.entities.user.fields.effective-state.title',
1350
- showInCreate: false,
1351
- readonly: true,
1352
- generate: { views: { enabled: true } },
1353
- },
1354
- },
1355
- { name: 'history' },
1356
- { name: 'lock' },
1357
- { name: 'compare' },
1358
- ],
1359
- pages: [],
1360
- groups: [
1361
- {
1362
- id: 'basic-info',
1363
- title: '@general:terms.interface.basic-info',
1364
- },
1365
- {
1366
- id: 'avatar',
1367
- title: '@general:terms.common.avatar',
1368
- icon: 'fa-light fa-image',
1369
- },
1370
- {
1371
- id: 'authorizations',
1372
- title: `@${i18n}:users.entities.user.groups.authorizations`,
1373
- },
1374
- {
1375
- id: 'user-account-access',
1376
- title: '@security-management:users.entities.user.groups.account-access',
1377
- },
1378
- ],
1379
- properties: [
1380
- {
1381
- name: 'username',
1382
- title: '@general:terms.contact.username',
1383
- groupId: 'basic-info',
1384
- options: {
1385
- filter: {
1386
- advance: {
1387
- enabled: true,
1388
- },
1389
- inline: {
1390
- enabled: true,
1391
- },
1392
- },
1393
- sort: {
1394
- enabled: true,
1395
- },
1396
- },
1397
- schema: {
1398
- dataType: 'string',
1399
- interface: {
1400
- type: AXPWidgetsCatalog.text,
1401
- options: {},
1402
- },
1403
- },
1404
- validations: [
1405
- {
1406
- rule: 'required',
1407
- },
1408
- ],
1409
- },
1410
- {
1411
- name: 'displayName',
1412
- title: `@general:terms.common.display-name`,
1413
- groupId: 'basic-info',
1414
- options: {
1415
- sort: {
1416
- enabled: true,
1417
- },
1418
- filter: {
1419
- advance: {
1420
- enabled: true,
1421
- },
1422
- inline: {
1423
- enabled: true,
1424
- },
1425
- },
1426
- },
1427
- schema: {
1428
- dataType: 'string',
1429
- interface: {
1430
- type: AXPWidgetsCatalog.text,
1431
- },
1432
- },
1433
- validations: [
1434
- {
1435
- rule: 'required',
1436
- },
1437
- ],
1438
- },
1439
- {
1440
- name: 'password',
1441
- title: '@security-management:users.entities.user.fields.password.title',
1442
- groupId: 'authorizations',
1443
- schema: {
1444
- dataType: 'string',
1445
- interface: {
1446
- type: AXPWidgetsCatalog.text,
1447
- },
1448
- },
1449
- },
1450
- {
1451
- name: 'avatar',
1452
- title: '@general:terms.common.avatar',
1453
- groupId: 'avatar',
1454
- schema: {
1455
- dataType: 'string',
1456
- nullable: true,
1457
- interface: {
1458
- type: AXPWidgetsList.Advanced.Image,
1459
- options: {
1460
- type: 'profile-photo',
1461
- },
1462
- },
1463
- },
1464
- },
1465
- {
1466
- name: 'pinCode',
1467
- title: '@security-management:users.entities.user.fields.pin-code.title',
1468
- groupId: 'authorizations',
1469
- schema: {
1470
- dataType: 'string',
1471
- readonly: true,
1472
- visible: false,
1473
- interface: {
1474
- type: AXPWidgetsCatalog.text,
1475
- },
1476
- },
1477
- },
1478
- {
1479
- name: 'roleIds',
1480
- title: '@security-management:users.entities.user.fields.roles.title',
1481
- groupId: 'authorizations',
1482
- schema: {
1483
- dataType: 'object',
1484
- interface: {
1485
- type: AXPWidgetsCatalog.lookup,
1486
- options: {
1487
- entity: 'SecurityManagement.Role',
1488
- multiple: true,
1489
- look: 'select',
1490
- expose: [
1491
- { source: 'id', target: 'roles.{id}' },
1492
- { source: 'title', target: 'roles.{title}' },
1493
- ],
1494
- // columnResolve: {
1495
- // strategy: 'countOnly',
1496
- // countFieldPath: 'roles.length',
1497
- // queryKey: 'SecurityManagement:User:RolesForListColumn',
1498
- // queryParams: { userId: 'id' },
1499
- // queryResultItemsPath: 'items',
1500
- // },
1501
- },
1502
- },
1503
- },
1504
- validations: [
1505
- {
1506
- rule: 'required',
1507
- },
1508
- ],
1509
- },
1510
- ],
1511
- columns: [{ name: 'username' }, { name: 'displayName' }, { name: 'roleIds', options: { dataPath: 'roles' } }],
1512
- interfaces: {
1513
- master: {
1514
- create: {
1515
- sections: [
1516
- {
1517
- id: 'basic-info',
1518
- order: 1,
1519
- layout: { positions: { lg: { colSpan: 8, colStart: 1 } } },
1520
- },
1521
- {
1522
- id: 'avatar',
1523
- order: 2,
1524
- layout: { positions: { lg: { colSpan: 4, colStart: 9 } } },
1525
- },
1526
- {
1527
- id: 'authorizations',
1528
- order: 3,
1529
- },
1530
- ],
1531
- properties: [
1532
- {
1533
- name: 'username',
1534
- layout: {
1535
- positions: {
1536
- lg: {
1537
- colSpan: 6,
1538
- },
1539
- },
1540
- },
1541
- },
1542
- {
1543
- name: 'displayName',
1544
- layout: {
1545
- positions: {
1546
- lg: {
1547
- colSpan: 6,
1548
- },
1549
- },
1550
- },
1551
- },
1552
- {
1553
- name: 'avatar',
1554
- layout: {
1555
- label: { visible: false },
1556
- positions: {
1557
- lg: {
1558
- colSpan: 12,
1559
- order: 1,
1560
- },
1561
- },
1562
- },
1563
- },
1564
- {
1565
- name: 'roleIds',
1566
- layout: {
1567
- positions: {
1568
- lg: {
1569
- colSpan: 12,
1570
- },
1571
- },
1572
- },
1573
- },
1574
- {
1575
- name: 'password',
1576
- layout: {
1577
- positions: {
1578
- lg: {
1579
- colSpan: 12,
1580
- },
1581
- },
1582
- },
1583
- },
1584
- ],
1585
- },
1586
- update: {
1587
- sections: [
1588
- {
1589
- id: 'basic-info',
1590
- order: 1,
1591
- layout: { positions: { lg: { colSpan: 8, colStart: 1 } } },
1592
- },
1593
- {
1594
- id: 'avatar',
1595
- order: 2,
1596
- layout: { positions: { lg: { colSpan: 4, colStart: 9 } } },
1597
- },
1598
- {
1599
- id: 'authorizations',
1600
- order: 3,
1601
- layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
1602
- },
1603
- {
1604
- id: 'user-account-access',
1605
- order: 4,
1606
- layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
1607
- },
1608
- ],
1609
- properties: [
1610
- {
1611
- name: 'username',
1612
- layout: {
1613
- positions: {
1614
- lg: {
1615
- colSpan: 6,
1616
- },
1617
- },
1618
- },
1619
- },
1620
- {
1621
- name: 'displayName',
1622
- layout: {
1623
- positions: {
1624
- lg: {
1625
- colSpan: 6,
1626
- },
1627
- },
1628
- },
1629
- },
1630
- {
1631
- name: 'avatar',
1632
- layout: {
1633
- label: { visible: false },
1634
- positions: {
1635
- lg: {
1636
- colSpan: 12,
1637
- order: 1,
1638
- },
1639
- },
1640
- },
1641
- },
1642
- {
1643
- name: 'roleIds',
1644
- layout: {
1645
- positions: {
1646
- lg: {
1647
- colSpan: 12,
1648
- },
1649
- },
1650
- },
1651
- },
1652
- {
1653
- name: 'password',
1654
- layout: {
1655
- positions: {
1656
- lg: {
1657
- colSpan: 12,
1658
- },
1659
- },
1660
- },
1661
- },
1662
- {
1663
- name: 'accountState',
1664
- layout: {
1665
- positions: {
1666
- lg: {
1667
- colSpan: 4,
1668
- },
1669
- },
1670
- },
1671
- },
1672
- {
1673
- name: 'accessState',
1674
- layout: {
1675
- positions: {
1676
- lg: {
1677
- colSpan: 4,
1678
- },
1679
- },
1680
- },
1681
- },
1682
- {
1683
- name: 'effectiveState',
1684
- layout: {
1685
- positions: {
1686
- lg: {
1687
- colSpan: 4,
1688
- },
1689
- },
1690
- },
1691
- },
1692
- ],
1693
- },
1694
- single: {
1695
- title: '{{ context.eval("displayName") ?? context.eval("username") }}',
1696
- sections: [
1697
- {
1698
- id: 'basic-info',
1699
- order: 1,
1700
- layout: { positions: { lg: { colSpan: 8, colStart: 1 } } },
1701
- },
1702
- {
1703
- id: 'avatar',
1704
- order: 2,
1705
- layout: { positions: { lg: { colSpan: 4, colStart: 9 } } },
1706
- },
1707
- {
1708
- id: 'authorizations',
1709
- order: 3,
1710
- layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
1711
- },
1712
- {
1713
- id: 'user-account-access',
1714
- order: 4,
1715
- layout: { positions: { lg: { colSpan: 12, colStart: 1 } } },
1716
- },
1717
- ],
1718
- properties: [
1719
- {
1720
- name: 'username',
1721
- layout: {
1722
- positions: {
1723
- lg: {
1724
- colSpan: 6,
1725
- },
1726
- },
1727
- },
1728
- },
1729
- {
1730
- name: 'displayName',
1731
- layout: {
1732
- positions: {
1733
- lg: {
1734
- colSpan: 6,
1735
- },
1736
- },
1737
- },
1738
- },
1739
- {
1740
- name: 'avatar',
1741
- layout: {
1742
- label: { visible: false },
1743
- positions: {
1744
- lg: {
1745
- colSpan: 12,
1746
- order: 1,
1747
- },
1748
- },
1749
- },
1750
- },
1751
- {
1752
- name: 'password',
1753
- layout: {
1754
- positions: {
1755
- lg: {
1756
- colSpan: 12,
1757
- },
1758
- },
1759
- },
1760
- },
1761
- {
1762
- name: 'roleIds',
1763
- layout: {
1764
- positions: {
1765
- lg: {
1766
- colSpan: 12,
1767
- },
1768
- },
1769
- },
1770
- },
1771
- {
1772
- name: 'accountState',
1773
- layout: {
1774
- positions: {
1775
- lg: {
1776
- colSpan: 4,
1777
- },
1778
- },
1779
- },
1780
- },
1781
- {
1782
- name: 'accessState',
1783
- layout: {
1784
- positions: {
1785
- lg: {
1786
- colSpan: 4,
1787
- },
1788
- },
1789
- },
1790
- },
1791
- {
1792
- name: 'effectiveState',
1793
- layout: {
1794
- positions: {
1795
- lg: {
1796
- colSpan: 4,
1797
- },
1798
- },
1799
- },
1800
- },
1801
- ],
1802
- actions: [...entityMasterRecordActions()],
1803
- },
1804
- list: {
1805
- actions: [...entityMasterCrudActions()],
1806
- layouts: {
1807
- card: {
1808
- enabled: true,
1809
- header: {
1810
- title: 'displayName',
1811
- description: 'description',
1812
- icon: 'icon',
1813
- },
1814
- fields: [
1815
- {
1816
- name: 'displayName',
1817
- title: 'Display Name',
1818
- showAs: {
1819
- type: AXPWidgetsCatalog.text,
1820
- },
1821
- },
1822
- {
1823
- name: 'roleIds',
1824
- },
1825
- {
1826
- name: 'username',
1827
- },
1828
- ],
1829
- },
1830
- table: {
1831
- enabled: true,
1832
- columns: [],
1833
- },
1834
- },
1835
- views: [
1836
- createAllQueryView({
1837
- sorts: [{ name: 'displayName', dir: 'asc' }],
1838
- }),
1839
- ],
1840
- },
1841
- },
1842
- },
1843
- };
1844
- return entityDef;
1845
- }
325
+ //#region ----- UserRole types -----
326
+ //#endregion
1846
327
 
1847
328
  //#region ---- Contracts barrel ----
1848
329
 
@@ -1850,5 +331,5 @@ async function usersFactory() {
1850
331
  * Generated bundle index. Do not edit.
1851
332
  */
1852
333
 
1853
- export { AXMSecurityManagementDataSourceKeys, AXMSessionStatusTypes, AXMUserAccessState, AXMUserEffectiveState, AXM_USER_ACCESS_STATE_DEFINITION_KEY, AXM_USER_EFFECTIVE_STATE_DEFINITION_KEY, AXPSecurityManagementFeatureKeys, AXPSecurityManagementMenuKeys, AXPSecurityManagementPermissionKeys, RootConfig, deviceSessionsFactory, policyFactory, profileFactory, rolesFactory, usersFactory };
334
+ export { AXMSecurityManagementServerCommands, AXMSessionStatusTypes, AXMUserAccessState, AXMUserEffectiveState, AXM_CHANGE_OWN_PASSWORD_ERROR_CODES, AXM_SECURITY_CONTEXT_DEFINITIONS, AXM_USER_ACCESS_STATE_DEFINITION_KEY, AXM_USER_EFFECTIVE_STATE_DEFINITION_KEY, AXM_USER_SEND_PASSWORD_RESET_COMMAND, AXPAdministrationPermissionKeys, AXPSecurityManagementFeatureKeys, AXPSecurityManagementMenuKeys, AXPSecurityManagementPermissionKeys, ROLE_PERMISSIONS_PAGE_COMPONENT_KEY, RootConfig, USER_ROLES_PAGE_COMPONENT_KEY, resolveAXMUserEffectiveState };
1854
335
  //# sourceMappingURL=acorex-platform-module-security-management-client-contracts.mjs.map