Skip to content

fix(projects): require admin for project deletion#4327

Open
beastpu wants to merge 1 commit into
multica-ai:mainfrom
beastpu:codex/fix-4220-project-delete-permissions
Open

fix(projects): require admin for project deletion#4327
beastpu wants to merge 1 commit into
multica-ai:mainfrom
beastpu:codex/fix-4220-project-delete-permissions

Conversation

@beastpu

@beastpu beastpu commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require the deleting user to be a workspace owner or admin before deleting a project
  • authorize against the project row workspace, not only caller supplied request context
  • hide the project detail delete action for non-admin workspace members
  • add regression coverage for plain members being denied and admins being allowed

Fixes #4220

Tests

  • go test ./internal/handler -run 'TestDeleteProjectRequiresAdminOrOwner|TestDeleteProjectAllowsAdmin|TestCreateProjectValidStatusReturns201|TestUpdateProjectInvalidStatusReturns400'
  • pnpm --filter @multica/views typecheck
  • git diff --check

Notes

  • I also tried a broader project-pattern handler test run. It fails in this local worktree because the shared test database schema is missing unrelated newer schema objects: profile_id and autopilot_subscriber. The targeted project-delete tests above pass.

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@beastpu is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

@beastpu beastpu force-pushed the codex/fix-4220-project-delete-permissions branch from cd41816 to 0d58e2d Compare June 19, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Project delete button in workspaces lacks permission checks and allows any user to delete any project

1 participant