ecrs-auth-core 1.0.88 → 1.0.89
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.service.js +9 -0
- package/package.json +1 -1
package/dist/auth.service.js
CHANGED
|
@@ -167,6 +167,15 @@ let AuthService = class AuthService {
|
|
|
167
167
|
const access = await this.moduleAccessRepo.findOne({
|
|
168
168
|
where: { userId, moduleId, isDeleted: 0, status: 1 },
|
|
169
169
|
});
|
|
170
|
+
console.log(access);
|
|
171
|
+
const access1 = await this.moduleAccessRepo
|
|
172
|
+
.createQueryBuilder("ma")
|
|
173
|
+
.where("ma.userId = :userId", { userId })
|
|
174
|
+
.andWhere("ma.moduleId = :moduleId", { moduleId })
|
|
175
|
+
.andWhere("ma.status = 1")
|
|
176
|
+
.andWhere("ma.isDeleted = 0")
|
|
177
|
+
.getOne();
|
|
178
|
+
console.log(access1);
|
|
170
179
|
console.log(`📊 Module access check result for user ID ${userId} and module ID ${moduleId}: ${access ? 'Allowed' : 'Denied'}`);
|
|
171
180
|
return !!access;
|
|
172
181
|
}
|