Fix job ownership verification (#132)

This commit is contained in:
Christian Kellner
2025-06-04 09:15:36 +02:00
committed by GitHub
parent 2194ffe0f4
commit 111c154ae3

View File

@@ -15,7 +15,7 @@ function doesJobBelongsToUser(job, req) {
if (user == null) {
return false;
}
return user.isAdmin || job.userId === job.userId;
return user.isAdmin || job.userId === user.id;
}
jobRouter.get('/', async (req, res) => {
const isUserAdmin = isAdmin(req);