feat(spaces): app-owned membership grants scope access (#214) #221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat-scope-appowned"
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?
Wires
spacestore(#213) into the scope driver so app-owned space memberships grant/spaces/<name>access, unioned with the existing read-only IdP-group spaces.scope.Drivergains an optional*spacestore.Store(WithSpaces); nil = IdP groups only, unchanged behaviour.resolve: after the IdP write/read-group checks, consults the store — owner/write member → read-write, read member → read-only. Non-members still getErrNotFound. #177 (admins scoped like users) intact — no admin exemption added.List("/spaces"): unions app-owned spaces with IdP-group spaces, deduped by name.main.go: opens the store (cfg.SpacesPath, default/data/.cairn/spaces.json), attaches it to the scope driver, and registers the path instatePathsso it's age-encrypted in the backend like shares/holds.config:SpacesPathfield + default.New
scope_appowned_test.go: member write, owner write, read-role read-only (write →ErrReadOnly), non-member denied,/spaceslisting + union-with-groups dedupe. Existing scope/IdP-group tests unchanged.Nothing writes to the store via the API yet — that's #216. This makes the grants real and testable.