refactor: remove organization slug

This commit is contained in:
2026-05-04 17:41:50 -04:00
parent 552f4f1f21
commit 58c1301054
14 changed files with 166 additions and 188 deletions

View File

@@ -17,7 +17,7 @@ Existing local data does not need to be preserved.
## Scope
- Add an `Organizations` backend module or follow the existing ownership pattern if organization code belongs with `Workspaces`.
- Add an organization persistence model with `Id`, `Name`, `Slug`, `OwnerUserId`, and `CreatedAt`, matching local conventions.
- Add an organization persistence model with `Id`, `Name`, `OwnerUserId`, and `CreatedAt`, matching local conventions.
- Require every workspace to belong to exactly one organization.
- Update workspace create/list/detail APIs to include organization ownership.
- Add current-user organization read APIs:
@@ -46,7 +46,6 @@ Existing local data does not need to be preserved.
- The first implementation may grant organization access through `Organization.OwnerUserId == currentUserId` and existing manager/administrator access. Full organization membership belongs to task 002.
- `CreateWorkspaceRequest` should require `OrganizationId`; reject creation when the user cannot manage that organization.
- `WorkspaceDto` should include `OrganizationId`.
- Slugs should keep the existing lowercase kebab-case validation used for workspaces.
- Use tests for unauthorized organization detail access and workspace creation under an inaccessible organization.
## Likely Files