rez_core 6.5.35 → 6.5.37

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "6.5.35",
3
+ "version": "6.5.37",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -12,6 +12,7 @@ import { plainToInstance } from 'class-transformer';
12
12
  import { UpdateUserDto } from '../dto/update-user.dto';
13
13
  import { EnterpriseRepository } from 'src/module/enterprise/repository/enterprise.repository';
14
14
  import { StatusConstant } from '../../../constant/status.constant';
15
+ import { RoleRepository } from '../repository/role.repository';
15
16
 
16
17
  @Injectable()
17
18
  @ActionHandler('User')
@@ -19,6 +20,7 @@ export class UserService {
19
20
  constructor(
20
21
  private userRepository: UserRepository,
21
22
  private userRoleMappingService: UserRoleMappingService,
23
+ private roleRepo: RoleRepository,
22
24
  private configService: ConfigService,
23
25
  private readonly enterpriseRepository: EnterpriseRepository,
24
26
  ) {
@@ -125,12 +127,8 @@ export class UserService {
125
127
  for (const i in userRoleMappings) {
126
128
  const userRoleMapping = userRoleMappings[i];
127
129
  const roleId = userRoleMapping.role_id;
128
- // const role = await super.getEntityData(
129
- // ENTITYTYPE_ROLE,
130
- // roleId,
131
- // loggedInUser,
132
- // );
133
- // roles.push(role);
130
+ const role = await this.roleRepo.findById(roleId);
131
+ roles.push(role);
134
132
  }
135
133
  userDto.roles = roles;
136
134
  }
@@ -225,7 +223,7 @@ export class UserService {
225
223
  async findByEmailId(
226
224
  email_id: string,
227
225
  enterprise_id?: number,
228
- getLastApp?: boolean
226
+ getLastApp?: boolean,
229
227
  ): Promise<UserData | null> {
230
228
  return await this.userRepository.findByEmailId(email_id, enterprise_id, getLastApp);
231
229
  }