Title: fix(sidebar): Write members see active Delete menu but get 403 from API · Issue #4695 · simstudioai/sim · GitHub
Open Graph Title: fix(sidebar): Write members see active Delete menu but get 403 from API · Issue #4695 · simstudioai/sim
X Title: fix(sidebar): Write members see active Delete menu but get 403 from API · Issue #4695 · simstudioai/sim
Description: 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 ...
Open Graph Description: 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 (4...
X Description: 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 sil...
Opengraph URL: https://github.com/simstudioai/sim/issues/4695
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix(sidebar): Write members see active Delete menu but get 403 from API","articleBody":"## Describe the bug\n\nWrite/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).\n\n- **Write members**: Delete menu appears **enabled**, but clicking it does nothing (API returns 403)\n- **Read members**: Delete menu appears **disabled**, which is correct visually but the reason is `!canEdit` rather than the actual admin requirement\n\nThe `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.\n\n## To Reproduce\n\n1. Add a user to a workspace with **write** permission\n2. Log in as that user\n3. Right-click a workflow or folder in the sidebar\n4. Observe the Delete menu item is **enabled**\n5. Click Delete → confirm in the modal\n6. Nothing happens (API returns 403, no error shown to user)\n\n## Expected behavior\n\nNon-admin members should **not see** the Delete menu option at all, since only admins can delete workflows/folders.\n\n## Additional context\n\n- `apps/sim/app/api/workflows/[id]/route.ts` DELETE handler uses `action: 'admin'`\n- `context-menu.tsx` already has `showDelete?: boolean` (default `true`) with `{showDelete && (...)}` conditional rendering\n- The fix is to pass `showDelete={userPermissions.canAdmin}` from `workflow-item.tsx` and `folder-item.tsx`","author":{"url":"https://github.com/minijeong-log","@type":"Person","name":"minijeong-log"},"datePublished":"2026-05-21T10:02:39Z","url":"https://github.com/simstudioai/sim/issues/4695"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2aea9cc1-b965-5f19-01ba-cad0ffbcbc08 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87C2:11DC7C:1464605:1BCDEC8:6AFB72AC |
| html-safe-nonce | 198cc23099191cd117015702ae86d1973b7eca8a12024609ce83a992e4c77bc1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0MyOjExREM3QzoxNDY0NjA1OjFCQ0RFQzg6NkFGQjcyQUMiLCJ2aXNpdG9yX2lkIjoiMzk4MjE5NDk1ODgyMjc2NTIyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | abd8fe780a53dca1823ba9b1ab1e0e56c75bc8355efa3018889dfcfacbeeaee3 |
| hovercard-subject-tag | issue:4493596977 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/simstudioai/sim/4695/issue_layout |
| twitter:image | https://opengraph.githubassets.com/600e70fc2ca5d49763ac65a2310c36109659e4c3fc8ab1c140e0fef954881bee/simstudioai/sim/issues/4695 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/600e70fc2ca5d49763ac65a2310c36109659e4c3fc8ab1c140e0fef954881bee/simstudioai/sim/issues/4695 |
| og:image:alt | 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 (4... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | minijeong-log |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48 |
| turbo-cache-control | no-preview |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2e8872b770cc4d5d0cc1f2026afab747a268e2ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width