mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 22:07:13 -04:00
check if connect user is active
This commit is contained in:
parent
b12215b3f9
commit
14bb0aa30c
@ -11,6 +11,7 @@ namespace MediaBrowser.Controller.Connect
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class ConnectUserQuery
|
||||
|
@ -291,6 +291,11 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
}, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
if (!connectUser.IsActive)
|
||||
{
|
||||
throw new ArgumentException("The Media Browser account has been disabled.");
|
||||
}
|
||||
|
||||
var user = GetUser(userId);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(user.ConnectUserId))
|
||||
@ -422,7 +427,8 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
{
|
||||
Email = response.Email,
|
||||
Id = response.Id,
|
||||
Name = response.Name
|
||||
Name = response.Name,
|
||||
IsActive = response.IsActive
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
public string Name { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string IsActive { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public string ImageUrl { get; set; }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user