@tomei/sso 0.54.2 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitlintrc.json +22 -22
- package/.gitlab-ci.yml +16 -16
- package/.husky/commit-msg +15 -15
- package/.husky/pre-commit +7 -7
- package/.prettierrc +4 -4
- package/Jenkinsfile +57 -57
- package/README.md +23 -23
- package/__tests__/unit/components/group/group.spec.ts +79 -79
- package/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.ts +88 -88
- package/__tests__/unit/components/group-privilege/group-privilege.spec.ts +68 -68
- package/__tests__/unit/components/group-reporting-user/group-reporting-user.spec.ts +66 -66
- package/__tests__/unit/components/group-system-access/group-system-access.spec.ts +83 -83
- package/__tests__/unit/components/login-user/l.spec.ts +746 -746
- package/__tests__/unit/components/login-user/login.spec.ts +1164 -1164
- package/__tests__/unit/components/password-hash/password-hash.service.spec.ts +31 -31
- package/__tests__/unit/components/system/system.spec.ts +254 -254
- package/__tests__/unit/components/system-privilege/system-privilege.spec.ts +83 -83
- package/__tests__/unit/components/user-group/user-group.spec.ts +86 -86
- package/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.ts +78 -78
- package/__tests__/unit/components/user-privilege/user-privilege.spec.ts +72 -72
- package/__tests__/unit/components/user-system-access/user-system-access.spec.ts +89 -89
- package/__tests__/unit/redis-client/redis.service.spec.ts +23 -23
- package/__tests__/unit/session/session.service.spec.ts +47 -47
- package/__tests__/unit/system-privilege/system-privilage.spec.ts +91 -91
- package/coverage/clover.xml +1452 -1452
- package/coverage/coverage-final.json +47 -47
- package/coverage/lcov-report/base.css +224 -224
- package/coverage/lcov-report/block-navigation.js +87 -87
- package/coverage/lcov-report/components/group/group.repository.ts.html +117 -117
- package/coverage/lcov-report/components/group/group.ts.html +327 -327
- package/coverage/lcov-report/components/group/index.html +130 -130
- package/coverage/lcov-report/components/group-object-privilege/group-object-privilege.repository.ts.html +117 -117
- package/coverage/lcov-report/components/group-object-privilege/group-object-privilege.ts.html +321 -321
- package/coverage/lcov-report/components/group-object-privilege/index.html +130 -130
- package/coverage/lcov-report/components/group-privilege/group-privilege.repository.ts.html +117 -117
- package/coverage/lcov-report/components/group-privilege/group-privilege.ts.html +303 -303
- package/coverage/lcov-report/components/group-privilege/index.html +130 -130
- package/coverage/lcov-report/components/group-reporting-user/group-reporting-user.repository.ts.html +117 -117
- package/coverage/lcov-report/components/group-reporting-user/group-reporting-user.ts.html +327 -327
- package/coverage/lcov-report/components/group-reporting-user/index.html +130 -130
- package/coverage/lcov-report/components/group-system-access/group-system-access.repository.ts.html +117 -117
- package/coverage/lcov-report/components/group-system-access/group-system-access.ts.html +309 -309
- package/coverage/lcov-report/components/group-system-access/index.html +130 -130
- package/coverage/lcov-report/components/login-history/index.html +115 -115
- package/coverage/lcov-report/components/login-history/login-history.repository.ts.html +117 -117
- package/coverage/lcov-report/components/login-user/index.html +130 -130
- package/coverage/lcov-report/components/login-user/login-user.ts.html +5007 -5007
- package/coverage/lcov-report/components/login-user/user.repository.ts.html +117 -117
- package/coverage/lcov-report/components/password-hash/index.html +115 -115
- package/coverage/lcov-report/components/password-hash/password-hash.service.ts.html +126 -126
- package/coverage/lcov-report/components/system/index.html +130 -130
- package/coverage/lcov-report/components/system/system.repository.ts.html +117 -117
- package/coverage/lcov-report/components/system/system.ts.html +909 -909
- package/coverage/lcov-report/components/system-privilege/index.html +130 -130
- package/coverage/lcov-report/components/system-privilege/system-privilege.repository.ts.html +120 -120
- package/coverage/lcov-report/components/system-privilege/system-privilege.ts.html +390 -390
- package/coverage/lcov-report/components/user-group/index.html +130 -130
- package/coverage/lcov-report/components/user-group/user-group.repository.ts.html +117 -117
- package/coverage/lcov-report/components/user-group/user-group.ts.html +354 -354
- package/coverage/lcov-report/components/user-object-privilege/index.html +130 -130
- package/coverage/lcov-report/components/user-object-privilege/user-object-privilege.repository.ts.html +117 -117
- package/coverage/lcov-report/components/user-object-privilege/user-object-privilege.ts.html +312 -312
- package/coverage/lcov-report/components/user-privilege/index.html +130 -130
- package/coverage/lcov-report/components/user-privilege/user-privilege.repository.ts.html +117 -117
- package/coverage/lcov-report/components/user-privilege/user-privilege.ts.html +306 -306
- package/coverage/lcov-report/components/user-system-access/index.html +130 -130
- package/coverage/lcov-report/components/user-system-access/user-system-access.repository.ts.html +117 -117
- package/coverage/lcov-report/components/user-system-access/user-system-access.ts.html +312 -312
- package/coverage/lcov-report/enum/group-type.enum.ts.html +108 -108
- package/coverage/lcov-report/enum/index.html +160 -160
- package/coverage/lcov-report/enum/index.ts.html +93 -93
- package/coverage/lcov-report/enum/user-status.enum.ts.html +105 -105
- package/coverage/lcov-report/enum/yn.enum.ts.html +96 -96
- package/coverage/lcov-report/index.html +370 -370
- package/coverage/lcov-report/models/group-object-privilege.entity.ts.html +333 -333
- package/coverage/lcov-report/models/group-privilege.entity.ts.html +315 -315
- package/coverage/lcov-report/models/group-reporting-user.entity.ts.html +339 -339
- package/coverage/lcov-report/models/group-system-access.entity.ts.html +324 -324
- package/coverage/lcov-report/models/group.entity.ts.html +435 -435
- package/coverage/lcov-report/models/index.html +310 -310
- package/coverage/lcov-report/models/login-history.entity.ts.html +252 -252
- package/coverage/lcov-report/models/staff.entity.ts.html +411 -411
- package/coverage/lcov-report/models/system-privilege.entity.ts.html +354 -354
- package/coverage/lcov-report/models/system.entity.ts.html +423 -423
- package/coverage/lcov-report/models/user-group.entity.ts.html +354 -354
- package/coverage/lcov-report/models/user-object-privilege.entity.ts.html +330 -330
- package/coverage/lcov-report/models/user-privilege.entity.ts.html +315 -315
- package/coverage/lcov-report/models/user-system-access.entity.ts.html +315 -315
- package/coverage/lcov-report/models/user.entity.ts.html +522 -522
- package/coverage/lcov-report/prettify.css +1 -1
- package/coverage/lcov-report/prettify.js +2 -2
- package/coverage/lcov-report/redis-client/index.html +115 -115
- package/coverage/lcov-report/redis-client/redis.service.ts.html +240 -240
- package/coverage/lcov-report/session/index.html +115 -115
- package/coverage/lcov-report/session/session.service.ts.html +246 -246
- package/coverage/lcov-report/sorter.js +196 -196
- package/coverage/lcov.info +2490 -2490
- package/coverage/test-report.xml +128 -128
- package/create-sso-user.sql +39 -39
- package/dist/__tests__/unit/components/group-privilege/group-privilege.test.d.ts +1 -0
- package/dist/__tests__/unit/components/group-privilege/group-privilege.test.js +71 -0
- package/dist/__tests__/unit/components/group-privilege/group-privilege.test.js.map +1 -0
- package/dist/__tests__/unit/components/login-user/login-user.spec.d.ts +0 -0
- package/dist/__tests__/unit/components/login-user/login-user.spec.js +6 -0
- package/dist/__tests__/unit/components/login-user/login-user.spec.js.map +1 -0
- package/dist/src/components/login-user/interfaces/user-info.interface.d.ts +2 -0
- package/dist/src/components/login-user/login-user.js +2 -0
- package/dist/src/components/login-user/login-user.js.map +1 -1
- package/dist/src/components/login-user/user.d.ts +7 -0
- package/dist/src/components/login-user/user.js +115 -1
- package/dist/src/components/login-user/user.js.map +1 -1
- package/dist/src/models/user.entity.d.ts +2 -0
- package/dist/src/models/user.entity.js +13 -0
- package/dist/src/models/user.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +58 -58
- package/jest.config.js +14 -14
- package/migrations/20240314080602-create-user-table.js +124 -124
- package/migrations/20240314080603-create-user-group-table.js +85 -85
- package/migrations/20240314080604-create-user-user-group-table.js +55 -55
- package/migrations/20240314080605-create-login-history-table.js +53 -53
- package/migrations/20240527064925-create-system-table.js +78 -78
- package/migrations/20240527064926-create-system-privilege-table.js +71 -71
- package/migrations/20240527065342-create-group-table.js +93 -93
- package/migrations/20240527065633-create-group-reporting-user-table.js +76 -76
- package/migrations/20240528011551-create-group-system-access-table.js +72 -72
- package/migrations/20240528023018-user-system-access-table.js +75 -75
- package/migrations/20240528032229-user-privilege-table.js +76 -76
- package/migrations/20240528063003-create-group-privilege-table.js +76 -76
- package/migrations/20240528063051-create-group-object-privilege-table.js +84 -84
- package/migrations/20240528063107-create-user-object-privilege-table.js +84 -84
- package/migrations/20240528063108-create-api-key-table.js +85 -85
- package/migrations/20241104104802-create-building-table.js +95 -95
- package/migrations/20250108091132-add-area-manager-user-id-to-building-table.js +14 -14
- package/migrations/20250108091133-add-passcode-to-user-table.js +36 -0
- package/package.json +90 -90
- package/sampledotenv +7 -7
- package/sonar-project.properties +22 -22
- package/src/components/login-user/interfaces/user-info.interface.ts +2 -0
- package/src/components/login-user/login-user.ts +2 -0
- package/src/components/login-user/user.ts +146 -1
- package/src/models/user.entity.ts +11 -0
- package/tsconfig.build.json +5 -5
- package/tsconfig.json +23 -23
|
@@ -51,6 +51,8 @@ export class User extends UserBase {
|
|
|
51
51
|
private _LastFailedLoginAt: Date;
|
|
52
52
|
private _LastPasswordChangedAt: Date;
|
|
53
53
|
private _NeedToChangePasswordYN: YN;
|
|
54
|
+
private _PasscodeHash: string;
|
|
55
|
+
private _PasscodeUpdatedAt: Date;
|
|
54
56
|
private _CreatedById: number;
|
|
55
57
|
private _CreatedAt: Date;
|
|
56
58
|
private _UpdatedById: number;
|
|
@@ -227,6 +229,22 @@ export class User extends UserBase {
|
|
|
227
229
|
this._UpdatedAt = value;
|
|
228
230
|
}
|
|
229
231
|
|
|
232
|
+
get PasscodeHash(): string {
|
|
233
|
+
return this._PasscodeHash;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private set PasscodeHash(value: string) {
|
|
237
|
+
this._PasscodeHash = value;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
get PasscodeUpdatedAt(): Date {
|
|
241
|
+
return this._PasscodeUpdatedAt;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
private set PasscodeUpdatedAt(value: Date) {
|
|
245
|
+
this._PasscodeUpdatedAt = value;
|
|
246
|
+
}
|
|
247
|
+
|
|
230
248
|
async getDetails(): Promise<{
|
|
231
249
|
FullName: string;
|
|
232
250
|
UserName: string;
|
|
@@ -278,6 +296,8 @@ export class User extends UserBase {
|
|
|
278
296
|
this.LastFailedLoginAt = userInfo.LastFailedLoginAt;
|
|
279
297
|
this.LastPasswordChangedAt = userInfo.LastPasswordChangedAt;
|
|
280
298
|
this.NeedToChangePasswordYN = userInfo.NeedToChangePasswordYN;
|
|
299
|
+
this.PasscodeHash = userInfo.PasscodeHash;
|
|
300
|
+
this.PasscodeUpdatedAt = userInfo.PasscodeUpdatedAt;
|
|
281
301
|
this.CreatedById = userInfo.CreatedById;
|
|
282
302
|
this.CreatedAt = userInfo.CreatedAt;
|
|
283
303
|
this.UpdatedById = userInfo.UpdatedById;
|
|
@@ -332,6 +352,8 @@ export class User extends UserBase {
|
|
|
332
352
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
|
333
353
|
LastPasswordChangedAt: user.LastPasswordChangedAt,
|
|
334
354
|
NeedToChangePasswordYN: user.NeedToChangePasswordYN,
|
|
355
|
+
PasscodeHash: user.PasscodeHash,
|
|
356
|
+
PasscodeUpdatedAt: user.PasscodeUpdatedAt,
|
|
335
357
|
CreatedById: user.CreatedById,
|
|
336
358
|
CreatedAt: user.CreatedAt,
|
|
337
359
|
UpdatedById: user.UpdatedById,
|
|
@@ -394,6 +416,8 @@ export class User extends UserBase {
|
|
|
394
416
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
|
395
417
|
LastPasswordChangedAt: user.LastPasswordChangedAt,
|
|
396
418
|
NeedToChangePasswordYN: user.NeedToChangePasswordYN,
|
|
419
|
+
PasscodeHash: user.PasscodeHash,
|
|
420
|
+
PasscodeUpdatedAt: user.PasscodeUpdatedAt,
|
|
397
421
|
CreatedById: user.CreatedById,
|
|
398
422
|
CreatedAt: user.CreatedAt,
|
|
399
423
|
UpdatedById: user.UpdatedById,
|
|
@@ -486,6 +510,8 @@ export class User extends UserBase {
|
|
|
486
510
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
|
487
511
|
LastPasswordChangedAt: user.LastPasswordChangedAt,
|
|
488
512
|
NeedToChangePasswordYN: user.NeedToChangePasswordYN,
|
|
513
|
+
PasscodeHash: user.PasscodeHash,
|
|
514
|
+
PasscodeUpdatedAt: user.PasscodeUpdatedAt,
|
|
489
515
|
CreatedById: user.CreatedById,
|
|
490
516
|
CreatedAt: user.CreatedAt,
|
|
491
517
|
UpdatedById: user.UpdatedById,
|
|
@@ -736,7 +762,7 @@ export class User extends UserBase {
|
|
|
736
762
|
const userGroups = await User._UserGroupRepo.findAll({
|
|
737
763
|
where: {
|
|
738
764
|
UserId: userId,
|
|
739
|
-
|
|
765
|
+
InheritGroupSystemAccessYN: 'Y',
|
|
740
766
|
Status: 'Active',
|
|
741
767
|
},
|
|
742
768
|
include: [
|
|
@@ -1509,6 +1535,8 @@ export class User extends UserBase {
|
|
|
1509
1535
|
LastPasswordChangedAt: null,
|
|
1510
1536
|
DefaultPasswordChangedYN: YN.No,
|
|
1511
1537
|
NeedToChangePasswordYN: YN.Yes,
|
|
1538
|
+
PasscodeHash: null,
|
|
1539
|
+
PasscodeUpdatedAt: null,
|
|
1512
1540
|
CreatedById: loginUser.UserId,
|
|
1513
1541
|
CreatedAt: new Date(),
|
|
1514
1542
|
UpdatedById: loginUser.UserId,
|
|
@@ -2584,6 +2612,8 @@ export class User extends UserBase {
|
|
|
2584
2612
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
|
2585
2613
|
LastPasswordChangedAt: user.LastPasswordChangedAt,
|
|
2586
2614
|
NeedToChangePasswordYN: user.NeedToChangePasswordYN,
|
|
2615
|
+
PasscodeHash: user.PasscodeHash,
|
|
2616
|
+
PasscodeUpdatedAt: user.PasscodeUpdatedAt,
|
|
2587
2617
|
CreatedById: user.CreatedById,
|
|
2588
2618
|
CreatedAt: user.CreatedAt,
|
|
2589
2619
|
UpdatedById: user.UpdatedById,
|
|
@@ -2708,6 +2738,8 @@ export class User extends UserBase {
|
|
|
2708
2738
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
|
2709
2739
|
LastPasswordChangedAt: user.LastPasswordChangedAt,
|
|
2710
2740
|
NeedToChangePasswordYN: user.NeedToChangePasswordYN,
|
|
2741
|
+
PasscodeHash: user.PasscodeHash,
|
|
2742
|
+
PasscodeUpdatedAt: user.PasscodeUpdatedAt,
|
|
2711
2743
|
CreatedById: user.CreatedById,
|
|
2712
2744
|
CreatedAt: user.CreatedAt,
|
|
2713
2745
|
UpdatedById: user.UpdatedById,
|
|
@@ -2723,4 +2755,117 @@ export class User extends UserBase {
|
|
|
2723
2755
|
throw error;
|
|
2724
2756
|
}
|
|
2725
2757
|
}
|
|
2758
|
+
|
|
2759
|
+
async updatePasscode(loginUser: User, passcode: string, dbTransaction: any) {
|
|
2760
|
+
try {
|
|
2761
|
+
// Part 1: Validate Passcode
|
|
2762
|
+
// Make sure passcode is numeric and 6 digit length, if not throw new ClassError by passing:
|
|
2763
|
+
// ClassName: “User”
|
|
2764
|
+
// MessageCode: “UserErrMsg0X”
|
|
2765
|
+
// Message: “Passcode must be 6-digit number.”
|
|
2766
|
+
if (!/^\d{6}$/.test(passcode)) {
|
|
2767
|
+
throw new ClassError(
|
|
2768
|
+
'User',
|
|
2769
|
+
'UserErrMsg0X',
|
|
2770
|
+
'Passcode must be 6-digit number.',
|
|
2771
|
+
);
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
// Part 2: Hash Passcode
|
|
2775
|
+
// Instantiate new PasswordHashService and hash the Params.passcode.
|
|
2776
|
+
const passwordHashService = new PasswordHashService();
|
|
2777
|
+
const passcodeHash = await passwordHashService.hashPassword(passcode);
|
|
2778
|
+
|
|
2779
|
+
// Part 3: Update User Record
|
|
2780
|
+
// Call _repo update method to update:
|
|
2781
|
+
// PasscodeHash: hash from Part 2
|
|
2782
|
+
// PasscodeUpdatedAt: new Date()
|
|
2783
|
+
// where: UserId: loginUser.ObjectId
|
|
2784
|
+
const entityValueBefore: IUserAttr = {
|
|
2785
|
+
UserId: this.UserId,
|
|
2786
|
+
UserName: this.UserName,
|
|
2787
|
+
FullName: this.FullName,
|
|
2788
|
+
IDNo: this.IDNo,
|
|
2789
|
+
IDType: this.IDType,
|
|
2790
|
+
ContactNo: this.ContactNo,
|
|
2791
|
+
Email: this.Email,
|
|
2792
|
+
Password: this.Password,
|
|
2793
|
+
Status: this.Status,
|
|
2794
|
+
DefaultPasswordChangedYN: this.DefaultPasswordChangedYN,
|
|
2795
|
+
FirstLoginAt: this.FirstLoginAt,
|
|
2796
|
+
LastLoginAt: this.LastLoginAt,
|
|
2797
|
+
MFAEnabled: this.MFAEnabled,
|
|
2798
|
+
MFAConfig: this.MFAConfig,
|
|
2799
|
+
RecoveryEmail: this.RecoveryEmail,
|
|
2800
|
+
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
|
2801
|
+
LastFailedLoginAt: this.LastFailedLoginAt,
|
|
2802
|
+
LastPasswordChangedAt: this.LastPasswordChangedAt,
|
|
2803
|
+
NeedToChangePasswordYN: this.NeedToChangePasswordYN,
|
|
2804
|
+
CreatedById: this.CreatedById,
|
|
2805
|
+
CreatedAt: this.CreatedAt,
|
|
2806
|
+
UpdatedById: this.UpdatedById,
|
|
2807
|
+
UpdatedAt: this.UpdatedAt,
|
|
2808
|
+
PasscodeHash: this.PasscodeHash,
|
|
2809
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
|
2810
|
+
};
|
|
2811
|
+
|
|
2812
|
+
this.PasscodeHash = passcodeHash;
|
|
2813
|
+
this.PasscodeUpdatedAt = new Date();
|
|
2814
|
+
|
|
2815
|
+
const entityValueAfter: IUserAttr = {
|
|
2816
|
+
UserId: this.UserId,
|
|
2817
|
+
UserName: this.UserName,
|
|
2818
|
+
FullName: this.FullName,
|
|
2819
|
+
IDNo: this.IDNo,
|
|
2820
|
+
IDType: this.IDType,
|
|
2821
|
+
ContactNo: this.ContactNo,
|
|
2822
|
+
Email: this.Email,
|
|
2823
|
+
Password: this.Password,
|
|
2824
|
+
Status: this.Status,
|
|
2825
|
+
DefaultPasswordChangedYN: this.DefaultPasswordChangedYN,
|
|
2826
|
+
FirstLoginAt: this.FirstLoginAt,
|
|
2827
|
+
LastLoginAt: this.LastLoginAt,
|
|
2828
|
+
MFAEnabled: this.MFAEnabled,
|
|
2829
|
+
MFAConfig: this.MFAConfig,
|
|
2830
|
+
RecoveryEmail: this.RecoveryEmail,
|
|
2831
|
+
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
|
2832
|
+
LastFailedLoginAt: this.LastFailedLoginAt,
|
|
2833
|
+
LastPasswordChangedAt: this.LastPasswordChangedAt,
|
|
2834
|
+
NeedToChangePasswordYN: this.NeedToChangePasswordYN,
|
|
2835
|
+
CreatedById: this.CreatedById,
|
|
2836
|
+
CreatedAt: this.CreatedAt,
|
|
2837
|
+
UpdatedById: this.UpdatedById,
|
|
2838
|
+
UpdatedAt: this.UpdatedAt,
|
|
2839
|
+
PasscodeHash: this.PasscodeHash,
|
|
2840
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
|
2841
|
+
};
|
|
2842
|
+
|
|
2843
|
+
await User._Repository.update(
|
|
2844
|
+
{
|
|
2845
|
+
PasscodeHash: this.PasscodeHash,
|
|
2846
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
where: {
|
|
2850
|
+
UserId: this.UserId,
|
|
2851
|
+
},
|
|
2852
|
+
transaction: dbTransaction,
|
|
2853
|
+
},
|
|
2854
|
+
);
|
|
2855
|
+
|
|
2856
|
+
// Record update activity using Activity class create method.
|
|
2857
|
+
const activity = new Activity();
|
|
2858
|
+
activity.ActivityId = activity.createId();
|
|
2859
|
+
activity.Action = ActionEnum.UPDATE;
|
|
2860
|
+
activity.Description = 'Update Passcode';
|
|
2861
|
+
activity.EntityType = 'LoginUser';
|
|
2862
|
+
activity.EntityId = this.UserId.toString();
|
|
2863
|
+
activity.EntityValueBefore = JSON.stringify(entityValueBefore);
|
|
2864
|
+
activity.EntityValueAfter = JSON.stringify(entityValueAfter);
|
|
2865
|
+
|
|
2866
|
+
await activity.create(loginUser.ObjectId, dbTransaction);
|
|
2867
|
+
} catch (error) {
|
|
2868
|
+
throw error;
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2726
2871
|
}
|
|
@@ -135,6 +135,17 @@ export default class User extends Model {
|
|
|
135
135
|
})
|
|
136
136
|
NeedToChangePasswordYN: YN;
|
|
137
137
|
|
|
138
|
+
@Column({
|
|
139
|
+
allowNull: true,
|
|
140
|
+
type: DataType.STRING,
|
|
141
|
+
})
|
|
142
|
+
PasscodeHash: string;
|
|
143
|
+
|
|
144
|
+
@Column({
|
|
145
|
+
type: DataType.DATE,
|
|
146
|
+
})
|
|
147
|
+
PasscodeUpdatedAt: Date;
|
|
148
|
+
|
|
138
149
|
@ForeignKey(() => User)
|
|
139
150
|
@Column({
|
|
140
151
|
type: DataType.INTEGER,
|
package/tsconfig.build.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"include": ["**/*.ts"],
|
|
4
|
-
"exclude": ["node_modules", "__tests__", "dist", "**/*spec.ts"]
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"include": ["**/*.ts"],
|
|
4
|
+
"exclude": ["node_modules", "__tests__", "dist", "**/*spec.ts"]
|
|
5
|
+
}
|
|
6
6
|
|
package/tsconfig.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"moduleResolution": "node",
|
|
10
|
-
"target": "es6",
|
|
11
|
-
"sourceMap": true,
|
|
12
|
-
"outDir": "./dist",
|
|
13
|
-
"baseUrl": "./src",
|
|
14
|
-
"rootDir": "./",
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"noImplicitAny": false,
|
|
18
|
-
"strictBindCallApply": false,
|
|
19
|
-
"forceConsistentCasingInFileNames": false,
|
|
20
|
-
"noFallthroughCasesInSwitch": false,
|
|
21
|
-
"strictNullChecks": false,
|
|
22
|
-
},
|
|
23
|
-
"exclude": ["node_modules", "dist"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"target": "es6",
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"outDir": "./dist",
|
|
13
|
+
"baseUrl": "./src",
|
|
14
|
+
"rootDir": "./",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"noImplicitAny": false,
|
|
18
|
+
"strictBindCallApply": false,
|
|
19
|
+
"forceConsistentCasingInFileNames": false,
|
|
20
|
+
"noFallthroughCasesInSwitch": false,
|
|
21
|
+
"strictNullChecks": false,
|
|
22
|
+
},
|
|
23
|
+
"exclude": ["node_modules", "dist"]
|
|
24
24
|
}
|