ecrs-auth-core 1.0.59 → 1.0.61
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/dist/auth.controller.js
CHANGED
|
@@ -35,7 +35,6 @@ let AuthController = class AuthController {
|
|
|
35
35
|
if (!allowedDb) {
|
|
36
36
|
throw new common_1.UnauthorizedException('You are not authorized to access this module');
|
|
37
37
|
}
|
|
38
|
-
// Double-check against computed permissions tree to avoid edge cases
|
|
39
38
|
const perms = await this.authService.getPermissions(user.id);
|
|
40
39
|
if (!Array.isArray(perms.modules) || !perms.modules.includes(requestedModuleId)) {
|
|
41
40
|
throw new common_1.UnauthorizedException('You are not authorized to access this module');
|
package/dist/auth.service.d.ts
CHANGED
package/dist/auth.service.js
CHANGED
|
@@ -101,6 +101,8 @@ let AuthService = class AuthService {
|
|
|
101
101
|
userImage: user.userImage,
|
|
102
102
|
employeeId: user.referenceId,
|
|
103
103
|
permissions: permissionTree,
|
|
104
|
+
parentId: user.parentId,
|
|
105
|
+
referenceId: user.referenceId,
|
|
104
106
|
};
|
|
105
107
|
return {
|
|
106
108
|
status: true,
|
|
@@ -118,6 +120,8 @@ let AuthService = class AuthService {
|
|
|
118
120
|
mobileNo: user.mobileNo,
|
|
119
121
|
userImage: user.userImage,
|
|
120
122
|
employeeId: user.referenceId,
|
|
123
|
+
parentId: user.parentId,
|
|
124
|
+
referenceId: user.referenceId,
|
|
121
125
|
},
|
|
122
126
|
},
|
|
123
127
|
access_token: this.jwtService.sign(payload),
|