mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 01:05:19 +03:00
Move SecurityException
This commit is contained in:
@@ -19,6 +19,11 @@ namespace Emby.Server.Implementations.HttpServer.Security
|
||||
public AuthorizationInfo Authenticate(HttpRequest request)
|
||||
{
|
||||
var auth = _authorizationContext.GetAuthorizationInfo(request);
|
||||
if (auth == null)
|
||||
{
|
||||
throw new SecurityException("Unauthenticated request.");
|
||||
}
|
||||
|
||||
if (auth.User?.HasPermission(PermissionKind.IsDisabled) ?? false)
|
||||
{
|
||||
throw new SecurityException("User account has been disabled.");
|
||||
|
||||
Reference in New Issue
Block a user