diff options
| author | cvium <clausvium@gmail.com> | 2023-02-08 23:55:26 +0100 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2023-02-09 13:51:37 +0100 |
| commit | 209edd38a4163a8cf4abd5e47bfe0ea1a100f351 (patch) | |
| tree | 58a255cbea40ccaf6397a7c3a5a66d960cd97f38 /Jellyfin.Api/Controllers/GenresController.cs | |
| parent | 231e0273c2e6cc2a254c72dd19731481d160c0ea (diff) | |
refactor: simplify authz
Diffstat (limited to 'Jellyfin.Api/Controllers/GenresController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/GenresController.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/GenresController.cs b/Jellyfin.Api/Controllers/GenresController.cs index 28ebe2047..711fb4aef 100644 --- a/Jellyfin.Api/Controllers/GenresController.cs +++ b/Jellyfin.Api/Controllers/GenresController.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; using System.Linq; -using Jellyfin.Api.Constants; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; @@ -23,7 +22,7 @@ namespace Jellyfin.Api.Controllers; /// <summary> /// The genres controller. /// </summary> -[Authorize(Policy = Policies.DefaultAuthorization)] +[Authorize] public class GenresController : BaseJellyfinApiController { private readonly IUserManager _userManager; @@ -132,7 +131,7 @@ public class GenresController : BaseJellyfinApiController QueryResult<(BaseItem, ItemCounts)> result; if (parentItem is ICollectionFolder parentCollectionFolder && (string.Equals(parentCollectionFolder.CollectionType, CollectionType.Music, StringComparison.Ordinal) - || string.Equals(parentCollectionFolder.CollectionType, CollectionType.MusicVideos, StringComparison.Ordinal))) + || string.Equals(parentCollectionFolder.CollectionType, CollectionType.MusicVideos, StringComparison.Ordinal))) { result = _libraryManager.GetMusicGenres(query); } |
