|
|
|
@ -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.");
|
|
|
|
|