rez_core 2.1.65 → 2.1.67
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/repository/menu.repository.js +0 -9
- package/dist/module/module/repository/menu.repository.js.map +1 -1
- package/dist/module/user/service/user-session.service.js +1 -1
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/module/repository/menu.repository.ts +16 -16
- package/src/module/user/service/user-session.service.ts +1 -1
package/package.json
CHANGED
|
@@ -96,22 +96,22 @@ export class MenuRepository extends Repository<MenuData> {
|
|
|
96
96
|
): Promise<number[]> {
|
|
97
97
|
const repo = this.dataSource.getRepository(UserRoleMapping);
|
|
98
98
|
|
|
99
|
-
if (userId) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
99
|
+
// if (userId) {
|
|
100
|
+
// // Check if user has any role mappings for the given appcode
|
|
101
|
+
// const getUserDetails = await this.dataSource.query(
|
|
102
|
+
// `
|
|
103
|
+
// SELECT * from cr_user where id = ?
|
|
104
|
+
// `,
|
|
105
|
+
// [userId],
|
|
106
|
+
// );
|
|
107
|
+
|
|
108
|
+
// if (
|
|
109
|
+
// getUserDetails.length > 0 &&
|
|
110
|
+
// getUserDetails[0].organization_id === 1
|
|
111
|
+
// ) {
|
|
112
|
+
// return [6];
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
115
|
|
|
116
116
|
// 1. Try exact level match
|
|
117
117
|
let roles = await repo
|
|
@@ -98,7 +98,7 @@ export class UserSessionService {
|
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
if (getUserDetails.organization_id
|
|
101
|
+
if (getUserDetails[0].organization_id == 1 && payload.level_type == 'ORG') {
|
|
102
102
|
payload.organization_id = payload.level_id;
|
|
103
103
|
}
|
|
104
104
|
|