nav-task-actions

This commit is contained in:
2026-03-05 11:16:40 +05:00
parent d6e697c22a
commit 9db1a4225b
4 changed files with 6 additions and 5 deletions

View File

@@ -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) });
}