oliver-zehentleitner / maity

hub: one 'whom an outside writer may name' reader (four computations in mentions, tasks, events and members)

Sign in to report

tsk-67s55hg9crb6 Proposed

Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: duplication.

What is wrong

  • mentions._visible_to (mentions.py:344-353) and routes/tasks._watchers (routes/tasks.py:651-662) contain the same expression: the shown principals of public_members.members(...) plus the writer.
  • routes/events.post_message (routes/events.py:832-839) computes a one-addressee variant.
  • routes/members.outside_shown (routes/members.py:773-780) keys the same set by membership id; me_session._from_outside builds on it and claim_requests.py:1032 calls it from the domain side.

Proposal

  • One public_members.nameable_by(conn, project_id, reader) (with an id-keyed variant if needed) used by all four.

Effort / risk: S. Low.