mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Don't throw exception on unauthenticated requests
This commit is contained in:
@@ -45,6 +45,11 @@ namespace Jellyfin.Api.Auth
|
||||
try
|
||||
{
|
||||
var authorizationInfo = await _authService.Authenticate(Request).ConfigureAwait(false);
|
||||
if (!authorizationInfo.HasToken)
|
||||
{
|
||||
return AuthenticateResult.NoResult();
|
||||
}
|
||||
|
||||
var role = UserRoles.User;
|
||||
if (authorizationInfo.IsApiKey || authorizationInfo.User.HasPermission(PermissionKind.IsAdministrator))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user