From 6fb6b5f1766a1f37a61b9faaa40209bab995bf30 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sun, 14 Apr 2024 08:18:36 -0600 Subject: Validate item access (#11171) --- MediaBrowser.Controller/Library/ILibraryManager.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'MediaBrowser.Controller/Library/ILibraryManager.cs') 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 @@ -177,6 +177,26 @@ namespace MediaBrowser.Controller.Library T GetItemById(Guid id) where T : BaseItem; + /// + /// Gets the item by id, as T, and validates user access. + /// + /// The item id. + /// The user id to validate against. + /// The type of item. + /// The item if found. + public T GetItemById(Guid id, Guid userId) + where T : BaseItem; + + /// + /// Gets the item by id, as T, and validates user access. + /// + /// The item id. + /// The user to validate against. + /// The type of item. + /// The item if found. + public T GetItemById(Guid id, User user) + where T : BaseItem; + /// /// Gets the intros. /// -- cgit v1.2.3