navidrome/server/e2e
Deluan Quintão a84f092d00
fix(subsonic): require admin access for Subsonic management endpoints (#5510)
* fix: require admin for radio mutations

Subsonic internet radio station mutation endpoints are admin-only in the Subsonic and OpenSubsonic specs, but the router only required an authenticated player. Add a reusable Subsonic admin middleware and apply it to create, update, and delete radio routes while leaving the list endpoint available to authenticated users. Cover the middleware and router behavior with unit and e2e tests.

* fix: streamline admin-only routes for internet radio station management

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: use admin-only middleware for starting scans

Signed-off-by: Deluan <deluan@navidrome.org>

* test: align start scan authorization coverage

StartScan authorization now lives in the shared Subsonic admin middleware instead of the handler. Remove the obsolete direct handler unit assertion so the package tests reflect the route-level guard covered by middleware and e2e tests.

* fix: require admin for getUsers

The Subsonic getUsers endpoint exposes user-list semantics and should use the same shared admin middleware as other admin-only management endpoints. Apply the route-level guard while leaving getUser unchanged, and update the multi-user e2e coverage to expect regular users to receive an authorization failure.

* test: cover admin-only Subsonic access

Add e2e coverage that admins can still call getUsers after the route-level guard and that regular authenticated users can still list internet radio stations. These cases capture the access boundaries raised during PR review.

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-05-19 14:23:38 -03: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 test(subsonic): add comprehensive e2e test suite for Subsonic API (#5003) 2026-02-09 08:24:37 -05: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