rez_core 6.5.36 → 6.5.38
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/module/module/entity/module-access.entity.d.ts +0 -1
- package/dist/module/module/entity/module-access.entity.js +0 -4
- package/dist/module/module/entity/module-access.entity.js.map +1 -1
- package/dist/module/user/service/role.service.js +2 -2
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +3 -3
- package/dist/module/user/service/user.service.js +5 -5
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/table.config.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/module/entity/module-access.entity.ts +0 -3
- package/src/module/user/service/role.service.ts +3 -3
- package/src/module/user/service/user.service.ts +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injectable } from '@nestjs/common';
|
|
2
2
|
import { UserData } from '../entity/user.entity';
|
|
3
3
|
import { Role } from '../entity/role.entity';
|
|
4
|
-
import {
|
|
4
|
+
import { STATUS_INACTIVE } from 'src/constant/global.constant';
|
|
5
5
|
import { RoleRepository } from '../repository/role.repository';
|
|
6
6
|
import { Repository } from 'typeorm';
|
|
7
7
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
@@ -63,11 +63,11 @@ export class RoleService {
|
|
|
63
63
|
const clonedPermissions = sourcePermissions.map((perm) =>
|
|
64
64
|
this.moduleAccessRepo.create({
|
|
65
65
|
role_code: savedRole.code,
|
|
66
|
-
module_code: perm.module_code,
|
|
67
66
|
action_type: perm.action_type,
|
|
68
67
|
access_flag: perm.access_flag,
|
|
69
68
|
level_type: perm.level_type,
|
|
70
69
|
appcode: perm.appcode,
|
|
70
|
+
module_id: perm.module_id
|
|
71
71
|
}),
|
|
72
72
|
);
|
|
73
73
|
|
|
@@ -155,7 +155,7 @@ export class RoleService {
|
|
|
155
155
|
const clonedPermissions = sourcePermissions.map((perm) =>
|
|
156
156
|
this.moduleAccessRepo.create({
|
|
157
157
|
role_code: role.code,
|
|
158
|
-
|
|
158
|
+
module_id: perm.module_id,
|
|
159
159
|
action_type: perm.action_type,
|
|
160
160
|
access_flag: perm.access_flag,
|
|
161
161
|
appcode: perm.appcode,
|
|
@@ -12,7 +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 {
|
|
15
|
+
import { RoleRepository } from '../repository/role.repository';
|
|
16
16
|
|
|
17
17
|
@Injectable()
|
|
18
18
|
@ActionHandler('User')
|
|
@@ -20,7 +20,7 @@ export class UserService {
|
|
|
20
20
|
constructor(
|
|
21
21
|
private userRepository: UserRepository,
|
|
22
22
|
private userRoleMappingService: UserRoleMappingService,
|
|
23
|
-
private
|
|
23
|
+
private roleRepo: RoleRepository,
|
|
24
24
|
private configService: ConfigService,
|
|
25
25
|
private readonly enterpriseRepository: EnterpriseRepository,
|
|
26
26
|
) {
|
|
@@ -127,7 +127,7 @@ export class UserService {
|
|
|
127
127
|
for (const i in userRoleMappings) {
|
|
128
128
|
const userRoleMapping = userRoleMappings[i];
|
|
129
129
|
const roleId = userRoleMapping.role_id;
|
|
130
|
-
const role = await this.
|
|
130
|
+
const role = await this.roleRepo.findById(roleId);
|
|
131
131
|
roles.push(role);
|
|
132
132
|
}
|
|
133
133
|
userDto.roles = roles;
|
|
@@ -223,7 +223,7 @@ export class UserService {
|
|
|
223
223
|
async findByEmailId(
|
|
224
224
|
email_id: string,
|
|
225
225
|
enterprise_id?: number,
|
|
226
|
-
getLastApp?: boolean
|
|
226
|
+
getLastApp?: boolean,
|
|
227
227
|
): Promise<UserData | null> {
|
|
228
228
|
return await this.userRepository.findByEmailId(email_id, enterprise_id, getLastApp);
|
|
229
229
|
}
|