nav-task-actions
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
log('currentUser:', currentUser);
|
||||
log('currentUser.role:', currentUser.role);
|
||||
//log('currentUser.role:', currentUser.role);
|
||||
|
||||
// Сбор доступных действий для конкретной задачи
|
||||
function buildActionsForTask(task) {
|
||||
@@ -105,7 +105,7 @@ log('nav-task-actions openChangeDeadlineModal yes');
|
||||
//}
|
||||
|
||||
// Удаление (если есть права)
|
||||
if (canEdit && !isDeleted && !isClosed) {
|
||||
if (canEdit && !isDeleted && !isClosed && currentUser.role === 'admin') {
|
||||
if (typeof deleteTask === 'function') actions.push({ label: '🗑️ Удалить', handler: () => deleteTask(taskId) });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user