Prechádzať zdrojové kódy

allow admin users to get Splashscreen even when disabled (#13825)

refactor
KGT1 2 mesiacov pred
rodič
commit
9c7cf808aa

+ 2 - 1
Jellyfin.Api/Controllers/ImageController.cs

@@ -1727,7 +1727,8 @@ public class ImageController : BaseJellyfinApiController
         [FromQuery, Range(0, 100)] int quality = 90)
     {
         var brandingOptions = _serverConfigurationManager.GetConfiguration<BrandingOptions>("branding");
-        if (!brandingOptions.SplashscreenEnabled)
+        var isAdmin = User.IsInRole(Constants.UserRoles.Administrator);
+        if (!brandingOptions.SplashscreenEnabled && !isAdmin)
         {
             return NotFound();
         }