quintodrome/server/e2e
Deluan 1e7996f5d7 fix(share): enforce per-user ownership on share reads
Share repository read methods (Get, GetAll, Read, ReadAll, Exists, Count,
CountAll) did not apply an owner filter, so non-admin users saw shares
belonging to other users. The write paths already enforced per-user ownership;
this brings reads in line with them.

Add an addRestriction()/ownerFilter() based scope to share reads, keeping
admins and the headless public-share resolution path unrestricted. Route share
and player Delete through a new base-repo deleteOwned() primitive that applies
the ownership predicate in the DELETE's WHERE clause (atomic, no select-then-
delete window) and classifies a zero-row result as permission-denied vs
not-found, mirroring updateOwned. The addRestriction helper and the write-miss
classifier are hoisted onto the base repository so player and share share one
implementation.

Also map rest.ErrPermissionDenied and rest.ErrNotFound in the Subsonic error
handler so ownership/not-found failures from the rest-backed repositories
return the proper Subsonic codes (50 / 70) instead of a generic error.

Covered by unit tests (persistence, subsonic error mapping) and an end-to-end
cross-user sharing isolation test.
2026-06-05 15:50:59 -04:00
..
doc.go docs: documents how subsonic e2e tests are structured 2026-02-11 22:49:41 -05:00
e2e_suite_test.go feat(subsonic): implement playbackReport OpenSubsonic extension (#5442) 2026-04-30 23:04:05 -04:00
subsonic_album_lists_test.go test(e2e): add transcode endpoint e2e tests and clean up test helpers 2026-03-09 09:43:55 -04:00
subsonic_bookmarks_test.go fix(subsonic): always return required playqueue fields (#5172) 2026-03-12 08:29:37 -04:00
subsonic_browsing_test.go test(e2e): add transcode endpoint e2e tests and clean up test helpers 2026-03-09 09:43:55 -04:00
subsonic_media_annotation_test.go feat(subsonic): implement playbackReport OpenSubsonic extension (#5442) 2026-04-30 23:04:05 -04:00
subsonic_media_retrieval_test.go fix: implement fallback to DefaultDownsamplingFormat for unknown formats 2026-03-11 09:46:13 -04:00
subsonic_multilibrary_test.go feat: add artist image uploads and image-folder artwork source (#5198) 2026-03-15 22:19:55 -04:00
subsonic_multiuser_test.go fix(subsonic): require admin access for Subsonic management endpoints (#5510) 2026-05-19 14:23:38 -03:00
subsonic_playlists_test.go fix(smartplaylists): coerce string booleans in smart playlist rules (#5450) 2026-05-01 19:21:48 -04:00
subsonic_radio_test.go fix(subsonic): require admin access for Subsonic management endpoints (#5510) 2026-05-19 14:23:38 -03:00
subsonic_scan_test.go refactor: move playlist business logic from repositories to service layer (#5027) 2026-02-21 19:57:13 -05:00
subsonic_searching_test.go fix(transcoding): clamp target channels to codec limit (#5336) (#5345) 2026-04-11 23:15:07 -04:00
subsonic_sharing_test.go fix(share): enforce per-user ownership on share reads 2026-06-05 15:50:59 -04:00
subsonic_sonic_similarity_test.go feat(subsonic): implement playbackReport OpenSubsonic extension (#5442) 2026-04-30 23:04:05 -04:00
subsonic_stream_test.go fix(transcoding): clamp target channels to codec limit (#5336) (#5345) 2026-04-11 23:15:07 -04:00
subsonic_system_test.go test(subsonic): add comprehensive e2e test suite for Subsonic API (#5003) 2026-02-09 08:24:37 -05:00
subsonic_transcode_test.go fix(transcoding): don't apply server-side override on getTranscodeDecision (#5473) 2026-05-06 10:03:24 -04:00
subsonic_users_test.go test(subsonic): add comprehensive e2e test suite for Subsonic API (#5003) 2026-02-09 08:24:37 -05:00