Skip to content

Thought experiment: network page visible to group organisers (RESDISCO-249, Nuxt) - #950

Draft
edwh wants to merge 3 commits into
nuxt-clientfrom
thought-249-network-visibility
Draft

edwh wants to merge 3 commits into
nuxt-clientfrom
thought-249-network-visibility

Conversation

@edwh

@edwh edwh commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Thought experiment (RESDISCO-249), not for merge as is. Rebuilt on the Nuxt 4 client (#898), replacing #945. Targets nuxt-client.

What changes

  • Who can open a network page. Before, only admins and that network's coordinators could; everyone else was sent to the forbidden page. Now volunteers and hosts of any group in the network can open it too (NetworkPolicy::viewPublic). Anyone else still gets the forbidden page.
  • What group members see. Coordinator-only parts are hidden from them: the groups and events awaiting moderation, "Add groups", "Export event list", tag management and the reporting links. If none of the Actions menu items apply, the menu is not shown. Admins and coordinators see the page as before.
  • Coordinators. Group members see the coordinators' names and photos, so they know who to contact.
  • Groups near you. A new section lists the five approved, active groups in the network nearest to the viewer's own groups, with distances in km. The viewer's own groups are left out and each group appears once. It is hidden when the viewer has no group with a location in the network.
  • Reporting link in the API. Before, GET /api/v2/networks/{id} returned reporting_url to everyone. Now it returns it only to the network's coordinators and admins, and null to everyone else.
  • New endpoint GET /api/v2/networks/{id}/viewer. It returns 403 to anyone who can't open the page; otherwise it returns can_moderate and nearby_groups. The page uses it to decide what to show.
  • The other public network endpoints (/networks/{id}, /groups, /tags, /stats) still answer anyone, because third parties use them.

en, fr and fr-BE strings. Tests: NetworkPageVisibilityTest (API), the page gating spec and a nearby-list spec.

The stats period toggle that was in #945 has moved to the network events thought experiment.

… parts

Add NetworkPolicy::viewPublic and GET /api/v2/networks/{id}/viewer, which 403s
anyone who is not an administrator, a coordinator of the network or a member of
one of its groups, and says whether the caller can moderate. The network
resource keeps reporting_url for coordinators and administrators only. The page
follows the API, hides moderation, add-groups, export, tags and reporting links
from non-coordinators, and shows the five nearest groups to the viewer's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egenerate specs manifest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r 401/403 in tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edwh
edwh deployed to preview October 27, 2026 18:12 — with GitHub Actions Active
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Preview: https://restarters-pr-950.fly.dev

✅ Ready - restore and migrations succeeded.

  • Password-protected test environment (usual dev gate password); commit 0bb96920b3fbb609b5f5f2b0d16a78cdbd7af186 merged with nuxt-client.
  • If you see a "warming up" page, give it a few minutes - it refreshes itself.
  • The preview database is refreshed on every deploy and may reset at any time; anything you create here is disposable.
  • Emails go to shared Mailpit, never to real recipients. Image uploads are disabled.
  • The app suspends when idle; the first request after a pause can take a moment.

This branch was successfully deployed

1 active deployment
preview — 0bb96920 Deployed Oct 27, 2026 by edwh via Deploy preview #715
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Deploy a Fly.io preview for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant