aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordafo90 <41897414+dafo90@users.noreply.github.com>2020-04-08 17:02:32 +0200
committerdafo90 <41897414+dafo90@users.noreply.github.com>2020-04-08 17:02:32 +0200
commitdd128b5e304db8c0707b14819afeac32dd15d476 (patch)
tree4e6671b7b63f6f6cd1c351d08d32c051439fd22d
parent62b0db59aa5a378b49044be5c3c02c03b0ed0de1 (diff)
Log message for each exception during login
-rw-r--r--Emby.Server.Implementations/Library/UserManager.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index 9164135b4..15076a194 100644
--- a/Emby.Server.Implementations/Library/UserManager.cs
+++ b/Emby.Server.Implementations/Library/UserManager.cs
@@ -326,6 +326,7 @@ namespace Emby.Server.Implementations.Library
if (user.Policy.IsDisabled)
{
+ _logger.LogInformation("Authentication request for {UserName} has been denied because this account is currently disabled (IP: {IP}).", username, remoteEndPoint);
throw new AuthenticationException(
string.Format(
CultureInfo.InvariantCulture,
@@ -335,11 +336,13 @@ namespace Emby.Server.Implementations.Library
if (!user.Policy.EnableRemoteAccess && !_networkManager.IsInLocalNetwork(remoteEndPoint))
{
+ _logger.LogInformation("Authentication request for {UserName} forbidden: remote access disabled and user not in local network (IP: {IP}).", username, remoteEndPoint);
throw new AuthenticationException("Forbidden.");
}
if (!user.IsParentalScheduleAllowed())
{
+ _logger.LogInformation("Authentication request for {UserName} is not allowed at this time due parental restrictions (IP: {IP}).", username, remoteEndPoint);
throw new AuthenticationException("User is not allowed access at this time.");
}