aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-01 15:26:58 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-01 15:26:58 -0400
commit8d4373af5ee192f512c9216f00937ffd1cb3fe99 (patch)
treeef80d4cf85fb5ff5fdd28e147cc8d64cd2126d0f /Emby.Server.Implementations/Session
parent3cdc6c5a5276d1328066ba56b8882eb7ded97741 (diff)
fixes #2903 - MediaBrowser.Controller.Net.SecurityException: This user account is not allowed access at this time
Diffstat (limited to 'Emby.Server.Implementations/Session')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index 6f185bc81..97506cdef 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -1406,11 +1406,19 @@ namespace Emby.Server.Implementations.Session
.FirstOrDefault(i => string.Equals(request.Username, i.Name, StringComparison.OrdinalIgnoreCase));
}
- if (user != null && !string.IsNullOrWhiteSpace(request.DeviceId))
+ if (user != null)
{
- if (!_deviceManager.CanAccessDevice(user.Id.ToString("N"), request.DeviceId))
+ if (!user.IsParentalScheduleAllowed())
+ {
+ throw new SecurityException("User is not allowed access at this time.");
+ }
+
+ if (!string.IsNullOrWhiteSpace(request.DeviceId))
{
- throw new SecurityException("User is not allowed access from this device.");
+ if (!_deviceManager.CanAccessDevice(user.Id.ToString("N"), request.DeviceId))
+ {
+ throw new SecurityException("User is not allowed access from this device.");
+ }
}
}