oliver-zehentleitner / maity
web: chat access History draws entries with the lists' whom/denied/when, given a name lookup
tsk-nyzyhh0c2wh1 Open
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: duplication.
What is wrong: web/js/chat-access.js:401-427 (asItWas, with named/agentsOf at :390-399, from #1989) builds the allow and deny wording again (side · their agents · human; deny agent/person/side; project) with the same chat_access.* keys as whom/when/denied (:151-171) and agentsText (:135); only the name lookup differs. The time part has already drifted: the list says "ended at …" for an expired allow (when, :162), History says "duration · until …" and never "ended".
Proposal: give whom, denied and when a name lookup ((id) => "@handle" | deleted) and use them in asItWas, keeping the deleted-person and deleted-agent cases as extra branches.
Effort / risk: S-M. Low risk (the history smoke cases pin the words).