+++
This commit is contained in:
@@ -467,6 +467,8 @@ function canUserEditTask(task) {
|
||||
|
||||
// Администратор может всё
|
||||
if (currentUser.role === 'admin') return true;
|
||||
// Пользователи с ролью 'tasks' могут редактировать любые задачи
|
||||
if (currentUser.role === 'tasks') return true;
|
||||
|
||||
// Создатель может редактировать свою задачу
|
||||
if (parseInt(task.created_by) === currentUser.id) {
|
||||
|
||||
Reference in New Issue
Block a user