api icon indicating copy to clipboard operation
api copied to clipboard

Chore: refactor membership deleting so users can leave workspaces on their own

Open jpmcb opened this issue 11 months ago • 3 comments

This ticket is two fold: currently, a workspace member cannot leave on their own volition. An owner must remove them:

https://github.com/open-sauced/api/blob/edd1a379e4d307c1df9f74cc1e7ed247e5e0d8cf/src/workspace/workspace-members.service.ts#L233-L241

This was also in service of not letting there be an "orphaned" workspace with no owner.

We should refactor this to support:

  • Members can leave workspaces at will
  • The last owner of a workspace cannot leave

jpmcb avatar Feb 29 '24 00:02 jpmcb