enforce user access to offline items

This commit is contained in:
Luke Pulverenti
2015-02-03 16:06:56 -05:00
parent 256990ac7b
commit 655c9ea7a1
10 changed files with 80 additions and 12 deletions

View File

@@ -1083,6 +1083,23 @@ namespace MediaBrowser.Controller.Entities
return IsParentalAllowed(user);
}
public virtual bool IsVisibleStandalone(User user)
{
if (!IsVisible(user))
{
return false;
}
if (Parents.Any(i => !i.IsVisible(user)))
{
return false;
}
// TODO: Need some work here, e.g. is in user library, for channels, can user access channel, etc.
return true;
}
/// <summary>
/// Gets a value indicating whether this instance is folder.
/// </summary>