We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b2345f commit 4bd0f7aCopy full SHA for 4bd0f7a
server/ctrlsubsonic/handlers_playlist.go
@@ -49,13 +49,14 @@ func (c *Controller) ServeGetPlaylists(r *http.Request) *spec.Response {
49
}
50
51
func (c *Controller) ServeGetPlaylist(r *http.Request) *spec.Response {
52
+ user := r.Context().Value(CtxUser).(*db.User)
53
params := r.Context().Value(CtxParams).(params.Params)
54
playlistID, err := params.GetFirst("id", "playlistId")
55
if err != nil {
56
return spec.NewError(10, "please provide an `id` parameter")
57
58
playlist, err := c.playlistStore.Read(playlistIDDecode(playlistID))
- if err != nil {
59
+ if err != nil || !playlist.CanRead(user.ID) {
60
return spec.NewError(70, "playlist with id %s not found", playlistID)
61
62
sub := spec.NewResponse()
0 commit comments