Backend: scope driver grants space access from app-owned membership (IdP groups stay read-only) #214

Closed
opened 2026-08-13 15:17:14 +00:00 by Cordy · 0 comments
Owner

Parent: #211. Depends on the membership store.

Today scope.Driver.resolve grants /spaces/<g> access purely from auth.User.Groups (IdP). Extend it so a user also reaches spaces where the app-owned store lists them as a member, with the same read/write + -ro semantics.

Scope

  • resolve consults both sources: IdP-group membership (existing, read/write per -ro) and app-owned membership (owner=write, member role=write/read).
  • List of /spaces (kindSyntheticSpaces) unions IdP groups + app-owned spaces the user belongs to (dedupe by name).
  • Precedence + de-dup when a name exists in both (spec it: app-owned wins, or refuse the collision at create — see store issue).
  • Keep #177 (admins scoped like users) intact.

Acceptance: scope tests covering: member of an app-owned space can read/write; non-member cannot see or resolve it; read-role member is read-only; owner is write; IdP-group spaces unchanged; listing unions both without duplicates.

Parent: #211. Depends on the membership store. Today `scope.Driver.resolve` grants `/spaces/<g>` access purely from `auth.User.Groups` (IdP). Extend it so a user also reaches spaces where the app-owned store lists them as a member, with the same read/write + `-ro` semantics. **Scope** - `resolve` consults both sources: IdP-group membership (existing, read/write per `-ro`) **and** app-owned membership (owner=write, member role=write/read). - `List` of `/spaces` (kindSyntheticSpaces) unions IdP groups + app-owned spaces the user belongs to (dedupe by name). - Precedence + de-dup when a name exists in both (spec it: app-owned wins, or refuse the collision at create — see store issue). - Keep #177 (admins scoped like users) intact. **Acceptance:** scope tests covering: member of an app-owned space can read/write; non-member cannot see or resolve it; read-role member is read-only; owner is write; IdP-group spaces unchanged; listing unions both without duplicates.
Cordy referenced this issue from a commit 2026-08-13 16:32:05 +00:00
Cordy closed this issue 2026-08-13 16:33:26 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#214
No description provided.