ecrs-auth-core 1.0.59 → 1.0.60

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.
@@ -19,6 +19,7 @@ export declare class AuthController {
19
19
  mobileNo: number;
20
20
  userImage: string;
21
21
  employeeId: number;
22
+ parentId: number;
22
23
  };
23
24
  };
24
25
  access_token: string;
@@ -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');
@@ -45,6 +45,7 @@ export declare class AuthService {
45
45
  mobileNo: number;
46
46
  userImage: string;
47
47
  employeeId: number;
48
+ parentId: number;
48
49
  };
49
50
  };
50
51
  access_token: string;
@@ -101,6 +101,7 @@ let AuthService = class AuthService {
101
101
  userImage: user.userImage,
102
102
  employeeId: user.referenceId,
103
103
  permissions: permissionTree,
104
+ parentId: user.parentId,
104
105
  };
105
106
  return {
106
107
  status: true,
@@ -118,6 +119,7 @@ let AuthService = class AuthService {
118
119
  mobileNo: user.mobileNo,
119
120
  userImage: user.userImage,
120
121
  employeeId: user.referenceId,
122
+ parentId: user.parentId,
121
123
  },
122
124
  },
123
125
  access_token: this.jwtService.sign(payload),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecrs-auth-core",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "description": "Centralized authentication and authorization module for ECRS apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",