Fix access to playlists not created by a user (#9746)

This commit is contained in:
Shadowghost
2023-05-12 15:11:59 +02:00
committed by GitHub
parent fdda721394
commit a8cdf4434b
5 changed files with 41 additions and 13 deletions

View File

@@ -34,10 +34,13 @@ namespace MediaBrowser.Controller.Playlists
public Playlist()
{
Shares = Array.Empty<Share>();
OpenAccess = false;
}
public Guid OwnerUserId { get; set; }
public bool OpenAccess { get; set; }
public Share[] Shares { get; set; }
[JsonIgnore]
@@ -233,6 +236,11 @@ namespace MediaBrowser.Controller.Playlists
return base.IsVisible(user);
}
if (OpenAccess)
{
return true;
}
var userId = user.Id;
if (userId.Equals(OwnerUserId))
{