From e95931fa62cbf5336098d0b296ad05f9e2b4a35e Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Tue, 17 Mar 2026 08:03:19 +0800 Subject: [PATCH] Fix read-only banner showing for editor members The view-only banner checked canEdit (hardcoded to isOwner) instead of canEditTasks (which includes create_modify members). Editors saw the banner incorrectly. Removed stale canEdit variable. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/projects/ProjectDetail.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/components/projects/ProjectDetail.tsx b/frontend/src/components/projects/ProjectDetail.tsx index 89d7022..ed036c2 100644 --- a/frontend/src/components/projects/ProjectDetail.tsx +++ b/frontend/src/components/projects/ProjectDetail.tsx @@ -146,7 +146,6 @@ export default function ProjectDetail() { const isShared = project ? project.user_id !== currentUserId : false; // For now, if they can see the project but don't own it, check if they can edit // The backend enforces actual permissions — this is just UI gating - const canEdit = isOwner; // Members with create_modify can also edit tasks (handled per-task) const canManageProject = isOwner; // Delta polling for real-time sync — only for shared projects (P-04) @@ -570,7 +569,7 @@ export default function ProjectDetail() { {/* Read-only banner for viewers */} - {isShared && !canEdit && ( + {isShared && !canEditTasks && (
You have view-only access to this project