hub: one 'caller session in good standing' check and one not_in_good_standing refusal (four copies)
tsk-deq6rbw1evy6 Proposed
Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: duplication.
What is wrong
invitations.standing_refusal(invitations.py:555-576, new in the range) androutes/restricted.py:66-75each read thehuman_sessionrow bycaller.human_session, callsessions.good_standing, and build the 403 with reasonnot_in_good_standinginline.notifications/address.py:172-174and:459-460, andauth/second_factor.py:786-787, build the same reason through their own helpers.- Related but separate: tsk-ftmhm1b15nek (one reader of a presented session cookie).
Proposal
sessions.caller_in_good_standing(conn, caller) -> booland one refusal helper with the reason; the four places call them, each keeping its own message text if the docs require it.
Effort / risk: S. Low; the refusals are pinned by the invitation, restricted and address tests.