diff options
| author | Cody Robibero <cody@robibe.ro> | 2024-04-14 08:18:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-14 08:18:36 -0600 |
| commit | 6fb6b5f1766a1f37a61b9faaa40209bab995bf30 (patch) | |
| tree | f169e72afeda371db2ffeb1b47c4dd88a03b4744 /MediaBrowser.Controller/Library/ILibraryManager.cs | |
| parent | 9a4db8008593647cb6728b10317680dd3152c934 (diff) | |
Validate item access (#11171)
Diffstat (limited to 'MediaBrowser.Controller/Library/ILibraryManager.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/ILibraryManager.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 6532f7a34..f0680f101 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -178,6 +178,26 @@ namespace MediaBrowser.Controller.Library 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> /// <param name="item">The item.</param> |
