Skip to content

Commit

Permalink
allow leader to get cr requests of other users
Browse files Browse the repository at this point in the history
  • Loading branch information
Mipronimo committed Jul 4, 2023
1 parent 47d9649 commit 9f941b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/userDocument.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function findOne(req, res) {
res.status(400).send('bad request')
return;
}
const year = req.query.year || (await settingModel.findByPk('currentYear')).value
const year = (await settingModel.findByPk('currentYear')).value
const isLT = req.kauth.grant.access_token.content.groups.includes(year + '_LT')
const isSelf = req.kauth.grant.access_token.content.sub === req.params.uuid
if (!isLT && !isSelf) {
Expand Down

0 comments on commit 9f941b7

Please sign in to comment.