подпись

This commit is contained in:
2026-02-19 16:07:07 +05:00
parent f6f079ed85
commit 4c9298c573
6 changed files with 652 additions and 74 deletions

View File

@@ -1648,10 +1648,15 @@ function checkTaskAccess(userId, taskId, callback) {
return;
}
// Администратор имеет полный доступ
if (user && user.role === 'admin') {
callback(null, true);
return;
}
if (user && user.role === 'tasks') {
callback(null, true);
return;
}
db.get("SELECT status, created_by, closed_at FROM tasks WHERE id = ?", [taskId], (err, task) => {
if (err || !task) {