mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-15 05:23:02 +03:00
Validate item access (#11171)
This commit is contained in:
@@ -2,7 +2,10 @@ using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Jellyfin.Api.Constants;
|
||||
using Jellyfin.Api.Extensions;
|
||||
using Jellyfin.Api.Helpers;
|
||||
using MediaBrowser.Common.Api;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.IO;
|
||||
@@ -61,7 +64,7 @@ public class ItemRefreshController : BaseJellyfinApiController
|
||||
[FromQuery] bool replaceAllMetadata = false,
|
||||
[FromQuery] bool replaceAllImages = false)
|
||||
{
|
||||
var item = _libraryManager.GetItemById(itemId);
|
||||
var item = _libraryManager.GetItemById<BaseItem>(itemId, User.GetUserId());
|
||||
if (item is null)
|
||||
{
|
||||
return NotFound();
|
||||
|
||||
Reference in New Issue
Block a user