Describe the bug
Write/Read workspace members can see the Delete option in the workflow/folder context menu, but the DELETE API enforces action: 'admin', so clicking Delete always fails silently (403).
- Write members: Delete menu appears enabled, but clicking it does nothing (API returns 403)
- Read members: Delete menu appears disabled, which is correct visually but the reason is
!canEdit rather than the actual admin requirement
The ContextMenu component already has a showDelete prop with conditional rendering ({showDelete && ...}), but neither workflow-item.tsx nor folder-item.tsx passes this prop, so it defaults to true and the Delete option is always shown.
To Reproduce
- Add a user to a workspace with write permission
- Log in as that user
- Right-click a workflow or folder in the sidebar
- Observe the Delete menu item is enabled
- Click Delete → confirm in the modal
- Nothing happens (API returns 403, no error shown to user)
Expected behavior
Non-admin members should not see the Delete menu option at all, since only admins can delete workflows/folders.
Additional context
apps/sim/app/api/workflows/[id]/route.ts DELETE handler uses action: 'admin'
context-menu.tsx already has showDelete?: boolean (default true) with {showDelete && (...)} conditional rendering
- The fix is to pass
showDelete={userPermissions.canAdmin} from workflow-item.tsx and folder-item.tsx
Describe the bug
Write/Read workspace members can see the Delete option in the workflow/folder context menu, but the DELETE API enforces
action: 'admin', so clicking Delete always fails silently (403).!canEditrather than the actual admin requirementThe
ContextMenucomponent already has ashowDeleteprop with conditional rendering ({showDelete && ...}), but neitherworkflow-item.tsxnorfolder-item.tsxpasses this prop, so it defaults totrueand the Delete option is always shown.To Reproduce
Expected behavior
Non-admin members should not see the Delete menu option at all, since only admins can delete workflows/folders.
Additional context
apps/sim/app/api/workflows/[id]/route.tsDELETE handler usesaction: 'admin'context-menu.tsxalready hasshowDelete?: boolean(defaulttrue) with{showDelete && (...)}conditional renderingshowDelete={userPermissions.canAdmin}fromworkflow-item.tsxandfolder-item.tsx