feat(spaces): app-owned SpacesAPI + /me capability (#216 API) #223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat-appspaces-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
API half of #216. Makes create-space and member management actually work without an IdP client, and gives the UI a capability signal to feature-detect against.
SpacesAPInow dispatches on its backend:Mgr(IdP power mode) orMembers *spacestore.Store(app-owned, default). Same routes;create,listMembers,setMember,removeMember, and owner resolution each branch to the configured store. App-owned member JSON is{user, role}— identical shape to the IdP path, so the frontend is unaffected.main.go: wires the app-ownedSpacesAPI(Members: spaceStore) whenever the IdP power mode is off — soapiH.Spacesis non-nil on every instance now (fixes the silent 404 root cause of #209/#210 on the backend side).GET /mereports"spaces": {"create": …, "manageMembers": …}(true when the spaces API is wired), for the frontend feature-detect (#216 frontend, next).New
spaces_appowned_test.go: httptest coverage of create, set/list/remove members, owner-not-removable (400), non-owner-denied (403), duplicate (409), unknown-space (404).Frontend feature-detect + error-surfacing follows as the second PR under #216.