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