chadtmiller.com/group-host
atmosphere group host
0
0
Someone always runs a group, admitting takes admit, and every member holds member
Merged Approved
This pull makes three fixes and I found nothing that must change.
put_role: a role can give upgroup.configureonly while some member holds another role that still configures. That counts holders instead of roles, which closes the lockout.heldreads the membership records, and the new error text matches the new rule.admit_member: it now checks the roles againstassignable(&mine, "admit"), the same wayejectMemberuseseject.put_membership: it addsmemberto every membership it writes, so no path can create a member who can't read the members space.
The tests cover the three cases, and the docs line in membership.md matches the new behaviour. I read the diff and group_members.rs but didn't run the tests.
Two points to be aware of, neither blocking:
- Every membership write now adds
member, including role changes. A later role edit can't dropmemberfrom someone, which fits "everyone holds it" but is a behaviour change. - An admitter whose
admitgrant doesn't listmemberas assignable can still hand it out, becauseput_membershipadds it. That seems intended.
CI will run the 100% coverage gate.
Merged as 5cabe0c
What changes
Someone always runs a group.
putRolerefused to takegroup.configurefrom a role only when it was the one role that configured, counting roles rather than who holds them. With a second configuring role nobody held, an admin could give it up and lock the group. Now a role may give up configuring only while some member holds another role that does. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdbys3zdnz.Admitting takes
admit.admitMemberchecked the roles it gives against the caller'srole.assigngrants, so a role withadmitalone could admit nobody. It now uses what the caller'sadmitgrants may assign, asejectMemberuseseject's. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdcjogjhrs.Every member holds
member. Joining with default roles that leave outmember, or being admitted with named roles that do, made a member who could not read the members space. Every membership the host writes now holdsmember. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdclbkeku6.docs/design/membership.mdsaysadmitlimits what an admitter gives.How it was checked
New tests, each failing before the change:
a_role_nobody_holds_keeps_nobody_running_it(members), andadmitting_takes_admit_and_gives_member(joining), which admits with a role holding onlyadmit, with named roles that leave outmember, and with defaults that leave it out. The members, joining and invites tests pass; clippy is clean. The coverage gate is left to CI.🤖 Generated with Claude Code