mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-04 06:48:35 +01:00
Fix access to playlists not created by a user (#9746)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user