подпись
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user