diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx index 54659d742..d7daf5fbb 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx @@ -225,9 +225,12 @@ export const ActionBar = memo( variant='ghost' onClick={(e) => { e.stopPropagation() - collaborativeBatchToggleLocked([blockId]) + if (!disabled) { + collaborativeBatchToggleLocked([blockId]) + } }} className={ACTION_BUTTON_STYLES} + disabled={disabled} > {isLocked ? : } @@ -319,18 +322,18 @@ export const ActionBar = memo( variant='ghost' onClick={(e) => { e.stopPropagation() - if (!disabled && !isLocked) { + if (!disabled && !isLocked && !isParentLocked) { collaborativeBatchRemoveBlocks([blockId]) } }} className={ACTION_BUTTON_STYLES} - disabled={disabled || isLocked} + disabled={disabled || isLocked || isParentLocked} > - {isLocked ? 'Block is locked' : getTooltipMessage('Delete Block')} + {isLocked || isParentLocked ? 'Block is locked' : getTooltipMessage('Delete Block')} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx index 742e17c0c..a5b769dfd 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx @@ -368,11 +368,11 @@ export function Editor() { )}
- {/* Locked indicator - clickable to unlock if user has admin permissions */} + {/* Locked indicator - clickable to unlock if user has admin permissions and block itself is locked */} {isLocked && currentBlock && ( - {userPermissions.canAdmin ? ( + {userPermissions.canAdmin && currentBlock.locked ? (