diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-03-19 09:23:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-19 09:23:32 +0100 |
| commit | e1c6bb0482230fd37cee352a169f2d3c441468e8 (patch) | |
| tree | 2c21bbebe05fc603c5367ab3b3dbdf28b92d147d /tests | |
| parent | 9857c21717380261e11ec948c3520a673ffd83ae (diff) | |
| parent | 85da0b50e2e9686a0d660e2c2138709937c2fee2 (diff) | |
Merge pull request #5561 from barronpm/permissions-fix
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs | 2 | ||||
| -rw-r--r-- | tests/Jellyfin.Api.Tests/TestHelpers.cs | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs index ee20cc573..de03aa5f5 100644 --- a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs @@ -128,6 +128,8 @@ namespace Jellyfin.Api.Tests.Auth { var authorizationInfo = _fixture.Create<AuthorizationInfo>(); authorizationInfo.User = _fixture.Create<User>(); + authorizationInfo.User.AddDefaultPermissions(); + authorizationInfo.User.AddDefaultPreferences(); authorizationInfo.User.SetPermission(PermissionKind.IsAdministrator, isAdmin); authorizationInfo.IsApiKey = false; diff --git a/tests/Jellyfin.Api.Tests/TestHelpers.cs b/tests/Jellyfin.Api.Tests/TestHelpers.cs index c1549561d..f9bca4146 100644 --- a/tests/Jellyfin.Api.Tests/TestHelpers.cs +++ b/tests/Jellyfin.Api.Tests/TestHelpers.cs @@ -29,6 +29,9 @@ namespace Jellyfin.Api.Tests typeof(DefaultAuthenticationProvider).FullName!, typeof(DefaultPasswordResetProvider).FullName!); + user.AddDefaultPermissions(); + user.AddDefaultPreferences(); + // Set administrator flag. user.SetPermission(PermissionKind.IsAdministrator, role.Equals(UserRoles.Administrator, StringComparison.OrdinalIgnoreCase)); |
