Groups "Used by" gains the real share count (#529 scope addition, extracted) #598

Closed
opened 2026-09-18 02:38:40 +00:00 by Cordy · 3 comments
Owner

Extraction of the 2026-09-16 scope addition recorded on #529 (comment 5456), so the tracker stays a tracker. The addressee it needed shipped in #570/#571; this is now buildable. The full research (Nextcloud #5586/#25755, groupfolders #2827, ownCloud advisory — no competitor surfaces this) lives in that comment.

Checklist, carried over verbatim in substance

  • Used by shows a real share count for app-owned and directory groups alike — "4 shares · 1 space · peering" rather than today's reference-only list.
  • The count is a link, not a dead number: clicking it lists the shared paths with owner and role, so the admin can act rather than go hunting.
  • Deletion stays fail-closed. A group holding grants cannot be deleted silently: the existing 409 extends to cover grants, naming them.
  • Membership changes must not destroy shares. Removing a member from a group revokes that person's resolution of group grants (which the resolution model already does — grants address the group, resolution walks membership); it must never delete the grant, and never touch grants owned by third parties.
  • Internal grants only on group rows — a group cannot hold a public link, and the test asserts the category error is impossible.
  • Lazy-loaded like member counts; the groups table must not block on a share scan.

Shape

Backend: a per-group grant count (and listing) query over share.Store — grants are AddresseeKind: "group" records, so this is a filter, not a new store. API beside the existing groups endpoints. Frontend: the Used-by cell grows the count + click-through listing; the cell and listing are drawn in mockup batch A (with #572 and #577) before the UI is built.

Closing this is one of the two remaining gates on #529 (the other is #572).

Extraction of the 2026-09-16 scope addition recorded on #529 (comment 5456), so the tracker stays a tracker. The addressee it needed shipped in #570/#571; this is now buildable. The full research (Nextcloud #5586/#25755, groupfolders #2827, ownCloud advisory — no competitor surfaces this) lives in that comment. ## Checklist, carried over verbatim in substance - [ ] **Used by shows a real share count** for app-owned and directory groups alike — "4 shares · 1 space · peering" rather than today's reference-only list. - [ ] **The count is a link**, not a dead number: clicking it lists the shared paths with owner and role, so the admin can act rather than go hunting. - [ ] **Deletion stays fail-closed.** A group holding grants cannot be deleted silently: the existing 409 extends to cover grants, naming them. - [ ] **Membership changes must not destroy shares.** Removing a member from a group revokes that person's resolution of group grants (which the resolution model already does — grants address the group, resolution walks membership); it must never delete the grant, and never touch grants owned by third parties. - [ ] **Internal grants only on group rows** — a group cannot hold a public link, and the test asserts the category error is impossible. - [ ] **Lazy-loaded** like member counts; the groups table must not block on a share scan. ## Shape Backend: a per-group grant count (and listing) query over `share.Store` — grants are `AddresseeKind: "group"` records, so this is a filter, not a new store. API beside the existing groups endpoints. Frontend: the Used-by cell grows the count + click-through listing; **the cell and listing are drawn in mockup batch A** (with #572 and #577) before the UI is built. Closing this is one of the two remaining gates on #529 (the other is #572).
Author
Owner

Mockup batch A is drawn: batch-a-572-577-598-mockup.html (design folder), blocks 6–7 — the Used-by cell ("4 shares · 1 space · peering", lazy-loaded, "Not used" as a real state), the fail-closed 409 wording naming grants, and the click-through listing (path / owner / role, spaces sectioned separately). One open question flagged: is the drill-down read-only (drawn) or does it get a per-row admin Revoke? Build waits on markup.

Mockup batch A is drawn: `batch-a-572-577-598-mockup.html` (design folder), blocks 6–7 — the Used-by cell ("4 shares · 1 space · peering", lazy-loaded, "Not used" as a real state), the fail-closed 409 wording naming grants, and the click-through listing (path / owner / role, spaces sectioned separately). One open question flagged: is the drill-down read-only (drawn) or does it get a per-row admin Revoke? Build waits on markup.
Author
Owner

Mockup approved (batch A rev 1 blocks 6–7 stand, no markup): compound count cell, lazy-loaded, "Not used" as a real state, fail-closed 409 naming grants, read-only drill-down (path / owner / role, spaces sectioned).

Mockup approved (batch A rev 1 blocks 6–7 stand, no markup): compound count cell, lazy-loaded, "Not used" as a real state, fail-closed 409 naming grants, **read-only** drill-down (path / owner / role, spaces sectioned).
Author
Owner

Shipped in v0.6.216 (PR #605), live on both dogfoods. Checklist: real share count in Used-by (lazy GET /api/v1/admin/groups/usage) ✓; count is a click-to-expand listing with path/owner/role ✓; deletion fail-closed with a 409 naming grants ✓; membership changes proven not to touch grants (test) ✓; group rows can only carry internal grants — links excluded at the source, test asserts it ✓; lazy-loaded, never blocks the table ✓. Closing.

Shipped in **v0.6.216** (PR #605), live on both dogfoods. Checklist: real share count in Used-by (lazy `GET /api/v1/admin/groups/usage`) ✓; count is a click-to-expand listing with path/owner/role ✓; deletion fail-closed with a 409 naming grants ✓; membership changes proven not to touch grants (test) ✓; group rows can only carry internal grants — links excluded at the source, test asserts it ✓; lazy-loaded, never blocks the table ✓. Closing.
Cordy closed this issue 2026-09-18 12:27:36 +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#598
No description provided.