8000 fix(groups): keep a group's address book with its organizers by mwoods79 · Pull Request #725 · huddlz-hq/huddlz · GitHub
[go: up one dir, main page]

Skip to content

fix(groups): keep a group's address book with its organizers - #725

Merged
mwoods79 merged 4 commits into
mainfrom
t3/restrict-group-location-reads
Nov 30, 2026
Merged

mwoods79 merged 4 commits into
mainfrom
t3/restrict-group-location-reads

Conversation

@mwoods79
@mwoods79 mwoods79 commented Nov 30, 2026 •
Copy link
Copy Markdown
Contributor

Summary

A group's address book is read only by the group's owner and organizers, the same people who can change it. Everyone else learns a place from a huddl they can see.

 Address book: who can read it
-  anyone, when the group is public
-  any member, when the group is private
+  the group's owner and organizers

 Huddl page and structured data
-  read the huddl's address book location as the viewer, show its name
+  read the huddl's own location_name (the name only; follows the huddl)
   address, place and coordinates were already on the huddl: unchanged

 Scheduling a huddl at a saved location
-  another group's location -> "must belong to the huddl's group"
+  another group's location -> "saved location is unavailable", as for a missing one
+  an online huddl           -> any address book location named on it is dropped

 Locations page, opening the delete dialog
+  read the location again as the person before counting the huddlz that use it

location_name is a non-public aggregate on the huddl. It is the one internal path from a huddl to its address book location, so the name still shows to everyone who can see the huddl. Huddl API responses are unchanged.

Evidence

Scenario Outline: Nobody else can list a group's address book
  Given a <public | private> group with "Maple Street House" saved in its address book
  When <a visitor | a nonmember | a member> lists the group's address book through <JSON:API | GraphQL>
  Then the address book lists nothing
  • Before: all six rows fail on main: the address book location comes back.
    After: all six rows pass, and the owner and organizer rows still list it.

The existing scenario "A crawler and visitor can identify a named huddl location" still passes, now through location_name.

  • Before (saved_location_scope_test.exs): an online huddl updated with another group's address book location kept it.
    After: the location is dropped and the huddl shows no location name.

Merge Danger

Door: two-way

A policy change with no migration and no data change; reverting restores the old read.

Blast Radius: API

  • This reverses a documented decision. The old policy comment said public groups' address books "stay readable by anyone", and a private group's by any member. An API client that lists group_locations / groupLocations without owning or organizing the group now gets an empty list rather than an error.
  • Members of an archived group no longer read its retained address book; its owner and organizers still do.
  • An address book location's name is still shown on any huddl held there, to everyone who can see that huddl.
  • A member's PATCH or DELETE on an address book location now answers 404 where it answered 403.
  • Not covered here: a person whose organizer role is removed while a huddl form or the Locations page is already open keeps what that page had loaded until it reloads. Open pages outliving a role change is handled separately.

A group's address book could be listed by anyone when the group was public,
and by any member when it was private. An address book location may be used
only by a members-only huddl or a draft, or by no huddl at all, so the list
handed out addresses to people who could not see any huddl held there.

Only the group's owner and organizers now read the address book, the same
people who can change it. Everyone else learns a place from a huddl they can
see: the huddl keeps its own address, map place and coordinates, and a new
location_name aggregate carries the location's name onto the huddl page and
its structured data without reading the address book as the viewer.
- scheduling a huddl with a saved location from another group's address
  book now says what it says for a location that does not exist
- the Locations page reads a location again as the person before looking up
  how many huddlz use it, so a role lost while the page is open counts
- the rename scenarios check the refusal itself and read the name back as
  the owner, with the owner's own rename as the control
Naming an address book location on an online huddl stored it unchecked,
whichever group it belonged to, and the huddl would then show its name.
An online huddl has no saved location, so one named on it is dropped.

The GraphQL rename scenario now requires the not-found answer.
The location name is read with authorization off, by the stored location
id alone. A row written before a huddl's location was checked against its
group could carry another group's location, and its name would show on
the huddl. The name is now read only from the huddl's own group.
@mwoods79
mwoods79 merged commit b429dc8 into main Nov 30, 2026
5 checks passed
@mwoods79
mwoods79 deleted the t3/restrict-group-location-reads branch November 30, 2026 04:26
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…vocation

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…-tokens

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…arer-token

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)

# Conflicts:
#	lib/huddlz_web/graphql_socket.ex
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…n-escaping

* origin/main:
  fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…dl-links

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…mutations

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…ership

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
* origin/main:
  fix(auth): bind administrator viewing credentials to the browser session (#736)
  fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…r-leave

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Dec 1, 2026
* origin/main:
  fix(auth): have open pages follow a change of access (#735)
  fix(groups): authorize membership changes against their roster (#739)
  fix(auth): bind administrator viewing credentials to the browser session (#736)
  fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Dec 1, 2026
…d-sorts

* origin/main:
  fix(auth): have open pages follow a change of access (#735)
  fix(groups): authorize membership changes against their roster (#739)
  fix(auth): bind administrator viewing credentials to the browser session (#736)
  fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0