Skip to content

Commit ed0d9f5

Browse files
fix(tables): don't show the update-lock notice to users without write access
Double-click checked the update lock before any permission check, so a read-only member on a locked table got "Editing rows is locked" — misleading (the lock isn't why they can't edit) and it swallowed the expanded-cell viewer, which is a legitimate read-only affordance.
1 parent 62779c8 commit ed0d9f5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2117,8 +2117,10 @@ export function TableGrid({
21172117

21182118
// Double-click means "edit this cell". On an update-locked table, say so
21192119
// rather than opening the expanded viewer — which looks like an editor
2120-
// that silently refuses to save.
2121-
if (updateLockedRef.current) {
2120+
// that silently refuses to save. Only for users who could otherwise edit:
2121+
// without write access the lock isn't why they can't, and they still get
2122+
// the read-only expanded viewer below.
2123+
if (canEditRef.current && updateLockedRef.current) {
21222124
onBlockedActionRef.current('edit-cell')
21232125
return
21242126
}

0 commit comments

Comments
 (0)