mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-23 01:16:18 +00:00
B"H allow accessing public playlists even when not admin
This commit is contained in:
parent
98a0deb2d0
commit
6bb98085bc
@ -37,7 +37,7 @@ def list_playlists():
|
|||||||
@api.route('/getPlaylist.view', methods = [ 'GET', 'POST' ])
|
@api.route('/getPlaylist.view', methods = [ 'GET', 'POST' ])
|
||||||
def show_playlist():
|
def show_playlist():
|
||||||
res = get_entity(Playlist)
|
res = get_entity(Playlist)
|
||||||
if res.user.id != request.user.id and not request.user.admin:
|
if res.user.id != request.user.id and not res.public and not request.user.admin:
|
||||||
raise Forbidden()
|
raise Forbidden()
|
||||||
|
|
||||||
info = res.as_subsonic_playlist(request.user)
|
info = res.as_subsonic_playlist(request.user)
|
||||||
|
Loading…
Reference in New Issue
Block a user