From 063155a46b072c0bb6ca6ef3f8cd669d9792fb34 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 2 Apr 2026 16:12:21 +0200 Subject: [PATCH] fix(overview): disable checkbox for read-only tasks on overview page The Overview's ShowTasks component was not passing the canMarkAsDone prop to SingleTaskInProject, which defaults to true. This caused read-only tasks to show an interactive checkbox even though the user doesn't have write permission. Use the project's maxPermission from the project store to determine if the user can mark the task as done. Also fix the disabled condition to use OR logic so the checkbox is disabled when ANY condition applies: archived, disabled, or when the user lacks write permission. Fixes #2399 --- frontend/src/components/tasks/partials/SingleTaskInProject.vue | 2 +- frontend/src/views/tasks/ShowTasks.vue | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/tasks/partials/SingleTaskInProject.vue b/frontend/src/components/tasks/partials/SingleTaskInProject.vue index 68b2421a5..e1625a732 100644 --- a/frontend/src/components/tasks/partials/SingleTaskInProject.vue +++ b/frontend/src/components/tasks/partials/SingleTaskInProject.vue @@ -14,7 +14,7 @@ > diff --git a/frontend/src/views/tasks/ShowTasks.vue b/frontend/src/views/tasks/ShowTasks.vue index dde1025f7..155e79012 100644 --- a/frontend/src/views/tasks/ShowTasks.vue +++ b/frontend/src/views/tasks/ShowTasks.vue @@ -87,6 +87,7 @@ :key="task.id" :show-project="true" :the-task="task" + :can-mark-as-done="(projectStore.projects[task.projectId]?.maxPermission ?? 0) > PERMISSIONS.READ" @taskUpdated="updateTasks" /> @@ -123,6 +124,7 @@ import {useProjectStore} from '@/stores/projects' import {useLabelStore} from '@/stores/labels' import type {TaskFilterParams} from '@/services/taskCollection' import TaskCollectionService from '@/services/taskCollection' +import {PERMISSIONS} from '@/constants/permissions' const props = withDefaults(defineProps<{ dateFrom?: Date | string,