@tomei/sso 0.60.4-dev.6 → 0.60.4-dev.8
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/coverage/lcov-report/components/login-user/login-user.ts.html +80 -73
- package/dist/src/components/login-history/login-history.js +4 -0
- package/dist/src/components/login-history/login-history.js.map +1 -1
- package/dist/src/components/login-user/interfaces/user-info.interface.d.ts +1 -0
- package/dist/src/components/login-user/login-user.js +1 -0
- package/dist/src/components/login-user/login-user.js.map +1 -1
- package/dist/src/components/login-user/user.d.ts +5 -0
- package/dist/src/components/login-user/user.js +207 -0
- package/dist/src/components/login-user/user.js.map +1 -1
- package/dist/src/models/user.entity.d.ts +1 -0
- package/dist/src/models/user.entity.js +8 -0
- package/dist/src/models/user.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/20250610070720-added-MFBypassYN-to-sso-user.js +30 -0
- package/package.json +1 -1
- package/src/components/login-history/login-history.ts +5 -0
- package/src/components/login-user/interfaces/user-info.interface.ts +1 -0
- package/src/components/login-user/login-user.ts +1 -0
- package/src/components/login-user/user.ts +260 -0
- package/src/models/user.entity.ts +7 -0
- package/sonar-project.properties +0 -23
@@ -1,65 +1,65 @@
|
|
1
|
-
|
2
1
|
<!doctype html>
|
3
2
|
<html lang="en">
|
4
3
|
|
5
4
|
<head>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
<title>Code coverage report for components/login-user/login-user.ts</title>
|
6
|
+
<meta charset="utf-8" />
|
7
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
8
|
+
<link rel="stylesheet" href="../../base.css" />
|
9
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
11
|
+
<style type='text/css'>
|
12
|
+
.coverage-summary .sorter {
|
13
|
+
background-image: url(../../sort-arrow-sprite.png);
|
14
|
+
}
|
15
|
+
</style>
|
17
16
|
</head>
|
18
|
-
|
17
|
+
|
19
18
|
<body>
|
20
|
-
<div class='wrapper'>
|
19
|
+
<div class='wrapper'>
|
21
20
|
<div class='pad1'>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
</div>
|
30
|
-
|
31
|
-
|
32
|
-
<div class='fl pad1y space-right2'>
|
33
|
-
<span class="strong">50.48% </span>
|
34
|
-
<span class="quiet">Branches</span>
|
35
|
-
<span class='fraction'>52/103</span>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
|
39
|
-
<div class='fl pad1y space-right2'>
|
40
|
-
<span class="strong">81.7% </span>
|
41
|
-
<span class="quiet">Functions</span>
|
42
|
-
<span class='fraction'>67/82</span>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
|
46
|
-
<div class='fl pad1y space-right2'>
|
47
|
-
<span class="strong">64.02% </span>
|
48
|
-
<span class="quiet">Lines</span>
|
49
|
-
<span class='fraction'>299/467</span>
|
50
|
-
</div>
|
51
|
-
|
52
|
-
|
21
|
+
<h1><a href="../../index.html">All files</a> / <a href="index.html">components/login-user</a> login-user.ts</h1>
|
22
|
+
<div class='clearfix'>
|
23
|
+
|
24
|
+
<div class='fl pad1y space-right2'>
|
25
|
+
<span class="strong">64.28% </span>
|
26
|
+
<span class="quiet">Statements</span>
|
27
|
+
<span class='fraction'>306/476</span>
|
53
28
|
</div>
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
29
|
+
|
30
|
+
|
31
|
+
<div class='fl pad1y space-right2'>
|
32
|
+
<span class="strong">50.48% </span>
|
33
|
+
<span class="quiet">Branches</span>
|
34
|
+
<span class='fraction'>52/103</span>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
|
38
|
+
<div class='fl pad1y space-right2'>
|
39
|
+
<span class="strong">81.7% </span>
|
40
|
+
<span class="quiet">Functions</span>
|
41
|
+
<span class='fraction'>67/82</span>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
<div class='fl pad1y space-right2'>
|
46
|
+
<span class="strong">64.02% </span>
|
47
|
+
<span class="quiet">Lines</span>
|
48
|
+
<span class='fraction'>299/467</span>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
|
52
|
+
</div>
|
53
|
+
<p class="quiet">
|
54
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the
|
55
|
+
previous block.
|
56
|
+
</p>
|
57
|
+
<template id="filterTemplate">
|
58
|
+
<div class="quiet">
|
59
|
+
Filter:
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
61
|
+
</div>
|
62
|
+
</template>
|
63
63
|
</div>
|
64
64
|
<div class='status-line medium'></div>
|
65
65
|
<pre><table class="coverage">
|
@@ -3652,6 +3652,7 @@ export class LoginUser extends LoginUserBase {
|
|
3652
3652
|
LastLoginAt: user.LastLoginAt,
|
3653
3653
|
MFAEnabled: user.MFAEnabled,
|
3654
3654
|
MFAConfig: user.MFAConfig,
|
3655
|
+
MFABypassYN: user.MFABypassYN,
|
3655
3656
|
RecoveryEmail: user.RecoveryEmail,
|
3656
3657
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
3657
3658
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -3713,6 +3714,7 @@ export class LoginUser extends LoginUserBase {
|
|
3713
3714
|
LastLoginAt: user.LastLoginAt,
|
3714
3715
|
MFAEnabled: user.MFAEnabled,
|
3715
3716
|
MFAConfig: user.MFAConfig,
|
3717
|
+
MFABypassYN: user.MFABypassYN,
|
3716
3718
|
RecoveryEmail: user.RecoveryEmail,
|
3717
3719
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
3718
3720
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -4633,6 +4635,7 @@ export class LoginUser extends LoginUserBase {
|
|
4633
4635
|
LastLoginAt: null,
|
4634
4636
|
MFAEnabled: null,
|
4635
4637
|
MFAConfig: null,
|
4638
|
+
MFABypassYN: null,
|
4636
4639
|
RecoveryEmail: null,
|
4637
4640
|
FailedLoginAttemptCount: 0,
|
4638
4641
|
LastFailedLoginAt: null,
|
@@ -4986,23 +4989,27 @@ export class LoginUser extends LoginUserBase {
|
|
4986
4989
|
<span class="cstat-no" title="statement not covered" > return output;</span>
|
4987
4990
|
}
|
4988
4991
|
}
|
4989
|
-
</pre
|
4992
|
+
</pre>
|
4993
|
+
</td>
|
4994
|
+
</tr>
|
4995
|
+
</table>
|
4996
|
+
</pre>
|
4997
|
+
|
4998
|
+
<div class='push'></div><!-- for sticky footer -->
|
4999
|
+
</div><!-- /wrapper -->
|
5000
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
5001
|
+
Code coverage generated by
|
5002
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
5003
|
+
at 2024-06-25T06:52:42.287Z
|
5004
|
+
</div>
|
5005
|
+
<script src="../../prettify.js"></script>
|
5006
|
+
<script>
|
5007
|
+
window.onload = function () {
|
5008
|
+
prettyPrint();
|
5009
|
+
};
|
5010
|
+
</script>
|
5011
|
+
<script src="../../sorter.js"></script>
|
5012
|
+
<script src="../../block-navigation.js"></script>
|
5013
|
+
</body>
|
4990
5014
|
|
4991
|
-
|
4992
|
-
</div><!-- /wrapper -->
|
4993
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
4994
|
-
Code coverage generated by
|
4995
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
4996
|
-
at 2024-06-25T06:52:42.287Z
|
4997
|
-
</div>
|
4998
|
-
<script src="../../prettify.js"></script>
|
4999
|
-
<script>
|
5000
|
-
window.onload = function () {
|
5001
|
-
prettyPrint();
|
5002
|
-
};
|
5003
|
-
</script>
|
5004
|
-
<script src="../../sorter.js"></script>
|
5005
|
-
<script src="../../block-navigation.js"></script>
|
5006
|
-
</body>
|
5007
|
-
</html>
|
5008
|
-
|
5015
|
+
</html>
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"login-history.js","sourceRoot":"","sources":["../../../../src/components/login-history/login-history.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,yEAAoE;AAGpE,0CAAkD;AAElD,yCAA+B;AAC/B,0DAA4C;AAE5C,MAAa,YAAa,SAAQ,oBAAU;IAe1C,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,YAAoB,gBAAoC;;QACtD,KAAK,EAAE,CAAC;QAjBV,cAAS,GAAG,kBAAkB,CAAC;QAC/B,eAAU,GAAG,eAAe,CAAC;QAiB3B,IAAI,gBAAgB,EAAE,CAAC;YACrB,IAAI,CAAC,SAAS,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAC;YACvC,IAAI,CAAC,QAAQ,GAAG,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,QAAQ,CAAC;YACjD,IAAI,CAAC,QAAQ,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,CAAC;YAC3C,IAAI,CAAC,UAAU,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,UAAU,CAAC;YAC/C,IAAI,CAAC,WAAW,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,WAAW,CAAC;YACjD,IAAI,CAAC,UAAU,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,CAAC;QAChD,CAAC;IACH,CAAC;IAEM,MAAM,CAA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AAE,MAAM,CAAC,MAAM,EAAE,CAAC,CACnD,CAAC;gBACJ,CAAC;gBAGD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,qBAAqB,+BAC3D,QAAQ,EAAE,IAAI,EACd,KAAK,EAAE,QAAQ,IACZ,QAAQ,KACX,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,EAC9B,OAAO,EAAE;wBACP;4BACE,KAAK,EAAE,qBAAI;4BACX,QAAQ,EAAE,KAAK;4BACf,UAAU,EAAE,CAAC,UAAU,CAAC;yBACzB;qBACF,EACD,WAAW,EAAE,aAAa,IAC1B,CAAC;gBAGH,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;gBACvE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;YAC/C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;;AAjHH,oCAkHC;AArGgB,kBAAK,GAAG,IAAI,iDAAsB,EAAE,AAA/B,CAAgC"}
|
@@ -64,6 +64,7 @@ class LoginUser extends user_1.User {
|
|
64
64
|
LastLoginAt: user.LastLoginAt,
|
65
65
|
MFAEnabled: user.MFAEnabled,
|
66
66
|
MFAConfig: user.MFAConfig,
|
67
|
+
MFABypassYN: user.MFABypassYN,
|
67
68
|
RecoveryEmail: user.RecoveryEmail,
|
68
69
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
69
70
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"login-user.js","sourceRoot":"","sources":["../../../../src/components/login-user/login-user.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCAA8B;AAE9B,4DAAmD;AAEnD,oEAAgE;AAChE,uDAAmD;AAEnD,4DAA8C;AAC9C,0DAAiD;AAEjD,+EAA0E;AAC1E,wFAA6E;AAC7E,8DAAqD;AACrD,0CAAkD;AAElD,MAAa,SAAU,SAAQ,WAAI;IAAnC;;QACE,YAAO,GAAG;YACR,EAAE,EAAE,IAAI;SACT,CAAC;
|
1
|
+
{"version":3,"file":"login-user.js","sourceRoot":"","sources":["../../../../src/components/login-user/login-user.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCAA8B;AAE9B,4DAAmD;AAEnD,oEAAgE;AAChE,uDAAmD;AAEnD,4DAA8C;AAC9C,0DAAiD;AAEjD,+EAA0E;AAC1E,wFAA6E;AAC7E,8DAAqD;AACrD,0CAAkD;AAElD,MAAa,SAAU,SAAQ,WAAI;IAAnC;;QACE,YAAO,GAAG;YACR,EAAE,EAAE,IAAI;SACT,CAAC;IAuVJ,CAAC;IArVC,MAAM,CAAO,IAAI;6DACf,cAA+B,EAC/B,MAAe,EACf,aAAa,GAAG,IAAI;YAEpB,WAAI,CAAC,aAAa,GAAG,MAAM,4BAAY,CAAC,IAAI,EAAE,CAAC;YAC/C,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,aAAa,EAAE,CAAC;oBAClB,WAAI,CAAC,WAAW,GAAG,IAAI,gCAAc,EAAE,CAAC;gBAC1C,CAAC;gBACD,MAAM,IAAI,GAAG,MAAM,WAAI,CAAC,WAAW,CAAC,OAAO,CAAC;oBAC1C,KAAK,EAAE;wBACL,MAAM,EAAE,MAAM;qBACf;oBACD,OAAO,EAAE;wBACP;4BACE,KAAK,EAAE,sBAAK;yBACb;qBACF;oBACD,WAAW,EAAE,aAAa;iBAC3B,CAAC,CAAC;gBAEH,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC1C,CAAC;gBAED,IAAI,IAAI,EAAE,CAAC;oBACT,MAAM,QAAQ,GAAc;wBAC1B,MAAM,EAAE,IAAI,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G,SAAS,CAAC;gBAClC,WAAW,CAAC,UAAU,GAAG,UAAU,CAAC;gBACpC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACtC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAClD,CAAC;YACJ,CAAC;iBAAM,CAAC;gBAEN,MAAM,QAAQ,GAAG;oBACf,EAAE,EAAE,UAAU;oBACd,IAAI,EAAE,UAAU;oBAChB,SAAS,EAAE,SAAS;oBACpB,UAAU,EAAE,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,aAAa,CAAC;iBAChE,CAAC;gBACF,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC1C,CAAC;YAED,IAAI,CAAC,eAAe,CAAC,cAAc,CACjC,IAAI,CAAC,QAAQ,EACb,WAAW,EACX,WAAW,CACZ,CAAC;QACJ,CAAC;KAAA;CACF;AA1VD,8BA0VC"}
|
@@ -25,6 +25,7 @@ export declare class User extends UserBase {
|
|
25
25
|
private _LastLoginAt;
|
26
26
|
private _MFAEnabled;
|
27
27
|
private _MFAConfig;
|
28
|
+
private _MFABypassYN;
|
28
29
|
private _RecoveryEmail;
|
29
30
|
private _FailedLoginAttemptCount;
|
30
31
|
private _LastFailedLoginAt;
|
@@ -74,6 +75,8 @@ export declare class User extends UserBase {
|
|
74
75
|
private set MFAEnabled(value);
|
75
76
|
get MFAConfig(): string;
|
76
77
|
private set MFAConfig(value);
|
78
|
+
get MFABypassYN(): string;
|
79
|
+
private set MFABypassYN(value);
|
77
80
|
get RecoveryEmail(): string;
|
78
81
|
private set RecoveryEmail(value);
|
79
82
|
get FailedLoginAttemptCount(): number;
|
@@ -169,4 +172,6 @@ export declare class User extends UserBase {
|
|
169
172
|
Name: string;
|
170
173
|
Rank: number;
|
171
174
|
}[]>;
|
175
|
+
enable2FABypass(loginUser: LoginUser, dbTransaction: any): Promise<void>;
|
176
|
+
disable2FABypass(loginUser: LoginUser, dbTransaction: any): Promise<void>;
|
172
177
|
}
|
@@ -100,6 +100,12 @@ class User extends general_1.UserBase {
|
|
100
100
|
set MFAConfig(value) {
|
101
101
|
this._MFAConfig = value;
|
102
102
|
}
|
103
|
+
get MFABypassYN() {
|
104
|
+
return this._MFABypassYN;
|
105
|
+
}
|
106
|
+
set MFABypassYN(value) {
|
107
|
+
this._MFABypassYN = value;
|
108
|
+
}
|
103
109
|
get RecoveryEmail() {
|
104
110
|
return this._RecoveryEmail;
|
105
111
|
}
|
@@ -203,6 +209,7 @@ class User extends general_1.UserBase {
|
|
203
209
|
this.LastLoginAt = userInfo.LastLoginAt;
|
204
210
|
this.MFAEnabled = userInfo.MFAEnabled;
|
205
211
|
this.MFAConfig = userInfo.MFAConfig;
|
212
|
+
this.MFABypassYN = userInfo.MFABypassYN;
|
206
213
|
this.RecoveryEmail = userInfo.RecoveryEmail;
|
207
214
|
this.FailedLoginAttemptCount = userInfo.FailedLoginAttemptCount;
|
208
215
|
this.LastFailedLoginAt = userInfo.LastFailedLoginAt;
|
@@ -253,6 +260,7 @@ class User extends general_1.UserBase {
|
|
253
260
|
LastLoginAt: user.LastLoginAt,
|
254
261
|
MFAEnabled: user.MFAEnabled,
|
255
262
|
MFAConfig: user.MFAConfig,
|
263
|
+
MFABypassYN: user.MFABypassYN,
|
256
264
|
RecoveryEmail: user.RecoveryEmail,
|
257
265
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
258
266
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -312,6 +320,7 @@ class User extends general_1.UserBase {
|
|
312
320
|
LastLoginAt: user.LastLoginAt,
|
313
321
|
MFAEnabled: user.MFAEnabled,
|
314
322
|
MFAConfig: user.MFAConfig,
|
323
|
+
MFABypassYN: user.MFABypassYN,
|
315
324
|
RecoveryEmail: user.RecoveryEmail,
|
316
325
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
317
326
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -389,6 +398,7 @@ class User extends general_1.UserBase {
|
|
389
398
|
LastLoginAt: user.LastLoginAt,
|
390
399
|
MFAEnabled: user.MFAEnabled,
|
391
400
|
MFAConfig: user.MFAConfig,
|
401
|
+
MFABypassYN: user.MFABypassYN,
|
392
402
|
RecoveryEmail: user.RecoveryEmail,
|
393
403
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
394
404
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -1076,6 +1086,7 @@ class User extends general_1.UserBase {
|
|
1076
1086
|
LastLoginAt: null,
|
1077
1087
|
MFAEnabled: null,
|
1078
1088
|
MFAConfig: null,
|
1089
|
+
MFABypassYN: yn_enum_1.YN.No,
|
1079
1090
|
RecoveryEmail: null,
|
1080
1091
|
FailedLoginAttemptCount: 0,
|
1081
1092
|
LastFailedLoginAt: null,
|
@@ -1750,6 +1761,7 @@ class User extends general_1.UserBase {
|
|
1750
1761
|
LastLoginAt: user.LastLoginAt,
|
1751
1762
|
MFAEnabled: user.MFAEnabled,
|
1752
1763
|
MFAConfig: user.MFAConfig,
|
1764
|
+
MFABypassYN: user.MFABypassYN,
|
1753
1765
|
RecoveryEmail: user.RecoveryEmail,
|
1754
1766
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
1755
1767
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -1832,6 +1844,7 @@ class User extends general_1.UserBase {
|
|
1832
1844
|
LastLoginAt: user.LastLoginAt,
|
1833
1845
|
MFAEnabled: user.MFAEnabled,
|
1834
1846
|
MFAConfig: user.MFAConfig,
|
1847
|
+
MFABypassYN: user.MFABypassYN,
|
1835
1848
|
RecoveryEmail: user.RecoveryEmail,
|
1836
1849
|
FailedLoginAttemptCount: user.FailedLoginAttemptCount,
|
1837
1850
|
LastFailedLoginAt: user.LastFailedLoginAt,
|
@@ -1877,6 +1890,7 @@ class User extends general_1.UserBase {
|
|
1877
1890
|
LastLoginAt: this.LastLoginAt,
|
1878
1891
|
MFAEnabled: this.MFAEnabled,
|
1879
1892
|
MFAConfig: this.MFAConfig,
|
1893
|
+
MFABypassYN: this.MFABypassYN,
|
1880
1894
|
RecoveryEmail: this.RecoveryEmail,
|
1881
1895
|
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
1882
1896
|
LastFailedLoginAt: this.LastFailedLoginAt,
|
@@ -1906,6 +1920,7 @@ class User extends general_1.UserBase {
|
|
1906
1920
|
LastLoginAt: this.LastLoginAt,
|
1907
1921
|
MFAEnabled: this.MFAEnabled,
|
1908
1922
|
MFAConfig: this.MFAConfig,
|
1923
|
+
MFABypassYN: this.MFABypassYN,
|
1909
1924
|
RecoveryEmail: this.RecoveryEmail,
|
1910
1925
|
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
1911
1926
|
LastFailedLoginAt: this.LastFailedLoginAt,
|
@@ -1967,6 +1982,7 @@ class User extends general_1.UserBase {
|
|
1967
1982
|
LastLoginAt: this.LastLoginAt,
|
1968
1983
|
MFAEnabled: this.MFAEnabled,
|
1969
1984
|
MFAConfig: this.MFAConfig,
|
1985
|
+
MFABypassYN: this.MFABypassYN,
|
1970
1986
|
RecoveryEmail: this.RecoveryEmail,
|
1971
1987
|
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
1972
1988
|
LastFailedLoginAt: this.LastFailedLoginAt,
|
@@ -1996,6 +2012,7 @@ class User extends general_1.UserBase {
|
|
1996
2012
|
LastLoginAt: this.LastLoginAt,
|
1997
2013
|
MFAEnabled: this.MFAEnabled,
|
1998
2014
|
MFAConfig: this.MFAConfig,
|
2015
|
+
MFABypassYN: this.MFABypassYN,
|
1999
2016
|
RecoveryEmail: this.RecoveryEmail,
|
2000
2017
|
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
2001
2018
|
LastFailedLoginAt: this.LastFailedLoginAt,
|
@@ -2122,6 +2139,196 @@ class User extends general_1.UserBase {
|
|
2122
2139
|
}
|
2123
2140
|
});
|
2124
2141
|
}
|
2142
|
+
enable2FABypass(loginUser, dbTransaction) {
|
2143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2144
|
+
try {
|
2145
|
+
if (this.MFABypassYN === yn_enum_1.YN.Yes) {
|
2146
|
+
throw new general_1.ClassError('User', 'UserErrMsg0X', 'Bypass already enabled.', 'enable2FABypass');
|
2147
|
+
}
|
2148
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
2149
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'MANAGE_MFA');
|
2150
|
+
if (!isPrivileged) {
|
2151
|
+
throw new general_1.ClassError('LoginUser', 'LoginUserErrMsg0X', 'You do not have permission to enable MFA bypass.');
|
2152
|
+
}
|
2153
|
+
const entityValueBefore = {
|
2154
|
+
UserId: this.UserId,
|
2155
|
+
UserName: this.UserName,
|
2156
|
+
FullName: this.FullName,
|
2157
|
+
IDNo: this.IDNo,
|
2158
|
+
IDType: this.IDType,
|
2159
|
+
ContactNo: this.ContactNo,
|
2160
|
+
Email: this.Email,
|
2161
|
+
Password: this.Password,
|
2162
|
+
Status: this.Status,
|
2163
|
+
DefaultPasswordChangedYN: this.DefaultPasswordChangedYN,
|
2164
|
+
FirstLoginAt: this.FirstLoginAt,
|
2165
|
+
LastLoginAt: this.LastLoginAt,
|
2166
|
+
MFAEnabled: this.MFAEnabled,
|
2167
|
+
MFAConfig: this.MFAConfig,
|
2168
|
+
MFABypassYN: this.MFABypassYN,
|
2169
|
+
RecoveryEmail: this.RecoveryEmail,
|
2170
|
+
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
2171
|
+
LastFailedLoginAt: this.LastFailedLoginAt,
|
2172
|
+
LastPasswordChangedAt: this.LastPasswordChangedAt,
|
2173
|
+
NeedToChangePasswordYN: this.NeedToChangePasswordYN,
|
2174
|
+
CreatedById: this.CreatedById,
|
2175
|
+
CreatedAt: this.CreatedAt,
|
2176
|
+
UpdatedById: this.UpdatedById,
|
2177
|
+
UpdatedAt: this.UpdatedAt,
|
2178
|
+
PasscodeHash: this.PasscodeHash,
|
2179
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
2180
|
+
};
|
2181
|
+
this.MFABypassYN = yn_enum_1.YN.Yes;
|
2182
|
+
this.UpdatedAt = new Date();
|
2183
|
+
this.UpdatedById = loginUser.UserId;
|
2184
|
+
yield User._Repository.update({
|
2185
|
+
MFABypassYN: this.MFABypassYN,
|
2186
|
+
UpdatedAt: this.UpdatedAt,
|
2187
|
+
UpdatedById: this.UpdatedById,
|
2188
|
+
}, {
|
2189
|
+
where: {
|
2190
|
+
UserId: this.UserId,
|
2191
|
+
},
|
2192
|
+
transaction: dbTransaction,
|
2193
|
+
});
|
2194
|
+
const entityValueAfter = {
|
2195
|
+
UserId: this.UserId,
|
2196
|
+
UserName: this.UserName,
|
2197
|
+
FullName: this.FullName,
|
2198
|
+
IDNo: this.IDNo,
|
2199
|
+
IDType: this.IDType,
|
2200
|
+
ContactNo: this.ContactNo,
|
2201
|
+
Email: this.Email,
|
2202
|
+
Password: this.Password,
|
2203
|
+
Status: this.Status,
|
2204
|
+
DefaultPasswordChangedYN: this.DefaultPasswordChangedYN,
|
2205
|
+
FirstLoginAt: this.FirstLoginAt,
|
2206
|
+
LastLoginAt: this.LastLoginAt,
|
2207
|
+
MFAEnabled: this.MFAEnabled,
|
2208
|
+
MFAConfig: this.MFAConfig,
|
2209
|
+
MFABypassYN: this.MFABypassYN,
|
2210
|
+
RecoveryEmail: this.RecoveryEmail,
|
2211
|
+
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
2212
|
+
LastFailedLoginAt: this.LastFailedLoginAt,
|
2213
|
+
LastPasswordChangedAt: this.LastPasswordChangedAt,
|
2214
|
+
NeedToChangePasswordYN: this.NeedToChangePasswordYN,
|
2215
|
+
CreatedById: this.CreatedById,
|
2216
|
+
CreatedAt: this.CreatedAt,
|
2217
|
+
UpdatedById: this.UpdatedById,
|
2218
|
+
UpdatedAt: this.UpdatedAt,
|
2219
|
+
PasscodeHash: this.PasscodeHash,
|
2220
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
2221
|
+
};
|
2222
|
+
const activity = new activity_history_1.Activity();
|
2223
|
+
activity.ActivityId = activity.createId();
|
2224
|
+
activity.Action = activity_history_1.ActionEnum.UPDATE;
|
2225
|
+
activity.Description = `Enable 2FA Bypass For User ${this.Email}`;
|
2226
|
+
activity.EntityType = this.ObjectType;
|
2227
|
+
activity.EntityId = this.UserId.toString();
|
2228
|
+
activity.EntityValueBefore = JSON.stringify(entityValueBefore);
|
2229
|
+
activity.EntityValueAfter = JSON.stringify(entityValueAfter);
|
2230
|
+
yield activity.create(loginUser.ObjectId, dbTransaction);
|
2231
|
+
}
|
2232
|
+
catch (error) {
|
2233
|
+
throw error;
|
2234
|
+
}
|
2235
|
+
});
|
2236
|
+
}
|
2237
|
+
disable2FABypass(loginUser, dbTransaction) {
|
2238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2239
|
+
try {
|
2240
|
+
if (this.MFABypassYN === yn_enum_1.YN.No) {
|
2241
|
+
throw new general_1.ClassError('User', 'UserErrMsg0X', 'Bypass already disabled.', 'disable2FABypass');
|
2242
|
+
}
|
2243
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
2244
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'MANAGE_MFA');
|
2245
|
+
if (!isPrivileged) {
|
2246
|
+
throw new general_1.ClassError('LoginUser', 'LoginUserErrMsg0X', 'You do not have permission to enable MFA bypass.');
|
2247
|
+
}
|
2248
|
+
const entityValueBefore = {
|
2249
|
+
UserId: this.UserId,
|
2250
|
+
UserName: this.UserName,
|
2251
|
+
FullName: this.FullName,
|
2252
|
+
IDNo: this.IDNo,
|
2253
|
+
IDType: this.IDType,
|
2254
|
+
ContactNo: this.ContactNo,
|
2255
|
+
Email: this.Email,
|
2256
|
+
Password: this.Password,
|
2257
|
+
Status: this.Status,
|
2258
|
+
DefaultPasswordChangedYN: this.DefaultPasswordChangedYN,
|
2259
|
+
FirstLoginAt: this.FirstLoginAt,
|
2260
|
+
LastLoginAt: this.LastLoginAt,
|
2261
|
+
MFAEnabled: this.MFAEnabled,
|
2262
|
+
MFAConfig: this.MFAConfig,
|
2263
|
+
MFABypassYN: this.MFABypassYN,
|
2264
|
+
RecoveryEmail: this.RecoveryEmail,
|
2265
|
+
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
2266
|
+
LastFailedLoginAt: this.LastFailedLoginAt,
|
2267
|
+
LastPasswordChangedAt: this.LastPasswordChangedAt,
|
2268
|
+
NeedToChangePasswordYN: this.NeedToChangePasswordYN,
|
2269
|
+
CreatedById: this.CreatedById,
|
2270
|
+
CreatedAt: this.CreatedAt,
|
2271
|
+
UpdatedById: this.UpdatedById,
|
2272
|
+
UpdatedAt: this.UpdatedAt,
|
2273
|
+
PasscodeHash: this.PasscodeHash,
|
2274
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
2275
|
+
};
|
2276
|
+
this.MFABypassYN = yn_enum_1.YN.No;
|
2277
|
+
this.UpdatedAt = new Date();
|
2278
|
+
this.UpdatedById = loginUser.UserId;
|
2279
|
+
yield User._Repository.update({
|
2280
|
+
MFABypassYN: this.MFABypassYN,
|
2281
|
+
UpdatedAt: this.UpdatedAt,
|
2282
|
+
UpdatedById: this.UpdatedById,
|
2283
|
+
}, {
|
2284
|
+
where: {
|
2285
|
+
UserId: this.UserId,
|
2286
|
+
},
|
2287
|
+
transaction: dbTransaction,
|
2288
|
+
});
|
2289
|
+
const entityValueAfter = {
|
2290
|
+
UserId: this.UserId,
|
2291
|
+
UserName: this.UserName,
|
2292
|
+
FullName: this.FullName,
|
2293
|
+
IDNo: this.IDNo,
|
2294
|
+
IDType: this.IDType,
|
2295
|
+
ContactNo: this.ContactNo,
|
2296
|
+
Email: this.Email,
|
2297
|
+
Password: this.Password,
|
2298
|
+
Status: this.Status,
|
2299
|
+
DefaultPasswordChangedYN: this.DefaultPasswordChangedYN,
|
2300
|
+
FirstLoginAt: this.FirstLoginAt,
|
2301
|
+
LastLoginAt: this.LastLoginAt,
|
2302
|
+
MFAEnabled: this.MFAEnabled,
|
2303
|
+
MFAConfig: this.MFAConfig,
|
2304
|
+
MFABypassYN: this.MFABypassYN,
|
2305
|
+
RecoveryEmail: this.RecoveryEmail,
|
2306
|
+
FailedLoginAttemptCount: this.FailedLoginAttemptCount,
|
2307
|
+
LastFailedLoginAt: this.LastFailedLoginAt,
|
2308
|
+
LastPasswordChangedAt: this.LastPasswordChangedAt,
|
2309
|
+
NeedToChangePasswordYN: this.NeedToChangePasswordYN,
|
2310
|
+
CreatedById: this.CreatedById,
|
2311
|
+
CreatedAt: this.CreatedAt,
|
2312
|
+
UpdatedById: this.UpdatedById,
|
2313
|
+
UpdatedAt: this.UpdatedAt,
|
2314
|
+
PasscodeHash: this.PasscodeHash,
|
2315
|
+
PasscodeUpdatedAt: this.PasscodeUpdatedAt,
|
2316
|
+
};
|
2317
|
+
const activity = new activity_history_1.Activity();
|
2318
|
+
activity.ActivityId = activity.createId();
|
2319
|
+
activity.Action = activity_history_1.ActionEnum.UPDATE;
|
2320
|
+
activity.Description = `Disable 2FA Bypass For User ${this.Email}`;
|
2321
|
+
activity.EntityType = this.ObjectType;
|
2322
|
+
activity.EntityId = this.UserId.toString();
|
2323
|
+
activity.EntityValueBefore = JSON.stringify(entityValueBefore);
|
2324
|
+
activity.EntityValueAfter = JSON.stringify(entityValueAfter);
|
2325
|
+
yield activity.create(loginUser.ObjectId, dbTransaction);
|
2326
|
+
}
|
2327
|
+
catch (error) {
|
2328
|
+
throw error;
|
2329
|
+
}
|
2330
|
+
});
|
2331
|
+
}
|
2125
2332
|
}
|
2126
2333
|
exports.User = User;
|
2127
2334
|
User._Repository = new user_repository_1.UserRepository();
|