hub: routes build the owner_only and owner-side isolated refusals through helpers (eight inline copies)
tsk-2njh2tg1kx80 Proposed
Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: duplication.
What is wrong
routes/members.owner_only(message)(routes/members.py:563) builds the 403owner_only; inline copies atroutes/projects.py:1896and:1910(both new),routes/joins.py:659,routes/placements.py:1135,routes/invitations.py:163.projects._authorise_patchalso spellsmine.trust != "owner" or mine.kind != "human"three times.- The 403
isolatedrefusal for an owner acting on an isolated agent is built inline three times:routes/joins.py:386-391,routes/placements.py:607-612,routes/members.py:1897-1903.isolation.refusal(row)(isolation.py:32-40) covers only the agent own calls.
Proposal
- Move
owner_onlytoerrorsand addrequire_human_owner(mine, message); addisolation.owner_refusal(action).
Effort / risk: S. Low.