mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Validate item access (#11171)
This commit is contained in:
@@ -177,6 +177,26 @@ namespace MediaBrowser.Controller.Library
|
||||
T GetItemById<T>(Guid id)
|
||||
where T : BaseItem;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the item by id, as T, and validates user access.
|
||||
/// </summary>
|
||||
/// <param name="id">The item id.</param>
|
||||
/// <param name="userId">The user id to validate against.</param>
|
||||
/// <typeparam name="T">The type of item.</typeparam>
|
||||
/// <returns>The item if found.</returns>
|
||||
public T GetItemById<T>(Guid id, Guid userId)
|
||||
where T : BaseItem;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the item by id, as T, and validates user access.
|
||||
/// </summary>
|
||||
/// <param name="id">The item id.</param>
|
||||
/// <param name="user">The user to validate against.</param>
|
||||
/// <typeparam name="T">The type of item.</typeparam>
|
||||
/// <returns>The item if found.</returns>
|
||||
public T GetItemById<T>(Guid id, User user)
|
||||
where T : BaseItem;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the intros.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user