rez_core 2.0.98 → 2.0.99
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/package.json
CHANGED
|
@@ -71,8 +71,11 @@ export class LoginController {
|
|
|
71
71
|
const currentUser = req.user.userData;
|
|
72
72
|
const currentAppcode = currentUser.appcode;
|
|
73
73
|
|
|
74
|
+
console.log(currentUser, 'DEBUG USER', data);
|
|
75
|
+
|
|
74
76
|
// If appcode is changing, validate the new level_id/level_type
|
|
75
77
|
if (data.appcode !== currentAppcode) {
|
|
78
|
+
console.log('inside if', data.appcode, currentAppcode);
|
|
76
79
|
const isValidAccess = await this.userSessionService.checkIfUserHasMapping(
|
|
77
80
|
currentUser.id,
|
|
78
81
|
data.appcode,
|
|
@@ -80,6 +83,8 @@ export class LoginController {
|
|
|
80
83
|
data.level_id,
|
|
81
84
|
);
|
|
82
85
|
|
|
86
|
+
console.log('isValidAccess', isValidAccess);
|
|
87
|
+
|
|
83
88
|
if (!isValidAccess) {
|
|
84
89
|
// If not valid, fetch the default one
|
|
85
90
|
const userMapping =
|
|
@@ -97,6 +102,11 @@ export class LoginController {
|
|
|
97
102
|
data.level_type = userMapping.level_type;
|
|
98
103
|
data.level_id = userMapping.level_id;
|
|
99
104
|
}
|
|
105
|
+
console.log(
|
|
106
|
+
data.level_type,
|
|
107
|
+
data.level_id,
|
|
108
|
+
'data.level_type, data.level_id',
|
|
109
|
+
);
|
|
100
110
|
}
|
|
101
111
|
|
|
102
112
|
return await this.userSessionService.switchCurrentLevelService(
|