Skip to content

Commit

Permalink
add temporary logs to checkAcl debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Nov 25, 2023
1 parent 590f0ac commit fd759fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middlewares/acl/CheckAclAnimalsPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export default function CheckAclAnimalsPermission(role: Roles) {
const id = req.params.id || req.body.id;

const animal = await Animal.findByPk(id);
console.log(animal)
console.log(userRoles)
if (userRoles.some(x =>
x.idRole && x.idRole >= role &&
x.idInstitution?.toString() === animal?.idInstitution
Expand Down

0 comments on commit fd759fd

Please sign in to comment.