admitMember requires admit, but it checks the roles it gives against members.assignable(&mine, "role.assign"). That set only draws on the caller's grants that carry role.assign. Suppose you define putRole {role: "gatekeeper", actions: ["admit"], assignable: [{role: "member"}]} and give it to bob. Bob gets past the admit check, but admitMember {did} with the default roles answers NotAssignable (["member"]), so his role is useless. This is unlike ejectMember, which scopes the check by its own action (assignable(&mine, "eject"), group_members.rs:472). The lexicon says only "Requires admit", which misleads. The tests only admit as the default admin, which holds every action, so none covers this (tests/joining.rs).
How to see it
Read against docs/fresh at 4636e6d, the code at: group_join.rs:176. Paths are under crates/group-host/src unless they say otherwise. Severity: medium.
What you expected
Use members.assignable(&mine, "admit"), so the admitting grant's own assignable list decides, as eject does.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
admitMemberrequiresadmit, but it checks the roles it gives againstmembers.assignable(&mine, "role.assign"). That set only draws on the caller's grants that carryrole.assign. Suppose you defineputRole {role: "gatekeeper", actions: ["admit"], assignable: [{role: "member"}]}and give it to bob. Bob gets past theadmitcheck, butadmitMember {did}with the default roles answersNotAssignable(["member"]), so his role is useless. This is unlikeejectMember, which scopes the check by its own action (assignable(&mine, "eject"), group_members.rs:472). The lexicon says only "Requires admit", which misleads. The tests only admit as the default admin, which holds every action, so none covers this (tests/joining.rs).How to see it
Read against
docs/freshat 4636e6d, the code at: group_join.rs:176. Paths are undercrates/group-host/srcunless they say otherwise. Severity: medium.What you expected
Use
members.assignable(&mine, "admit"), so the admitting grant's ownassignablelist decides, asejectdoes.Where
The host, as built from 4636e6d. Found while checking the docs against the code.