mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-11 22:38:54 +00:00
12a8ebe380
Two things found by checking #1696 and #1699 -- open branches carrying the same fixes I wrote this morning -- against what I actually shipped. **topClientsByStorage was scoped with the wrong question.**4b8220anarrowed it with StaffLibraryScope::files(), which is right for the two widgets that name files and wrong for the one that names clients: a stranger client's upload can sit legitimately inside a scoped viewer's library, shared with a group one of their own clients belongs to. So the file was theirs to read and the uploader's name was not theirs to see. Measured: "Stranger Client Ltd", on nobody's roster, ranked on a scoped dashboard. assignableClientIds is what the widget is actually asking, and it is what #1699 used. Their version was right and mine was not. **The client guard is one method now, not eight copies.** #1696 wrote it as a private guardTarget() rather than repeating viewer-resolve plus abort at each site, which is better, and this is a change whose whole argument is that a rule stated in many places drifts. Behaviour is identical; the eight sites now read as one rule. The published document reorders a 404 below a 422 on one path. Scramble reads abort_unless out of a method body but not out of a helper it calls, so the 404 now comes from route model binding instead of from the inline abort -- same response, different position. #1701's body names this trap; worth knowing it costs ordering and not content. Credit where it is due: both come from denkfabrik-li's #1696 and #1699, which were open while I was writing the same fixes. Those two are closed against this and againste7b5b6a,4b8220aand67e9204.