aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-10-01 20:14:10 -0400
committerGitHub <noreply@github.com>2017-10-01 20:14:10 -0400
commit796f374359d75e22d2095b3f3a8f9b220cacde27 (patch)
tree253f4c152432f2ca2f9fb074b05650359a7ec23c /Emby.Server.Implementations/Session
parent71ee865689a1fe8ffbc8cf6067b99f4ed9b12fbe (diff)
parent1da8509ae5b09cb421ece67421f2a88544a2c940 (diff)
Merge pull request #2930 from MediaBrowser/dev
Dev
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.");
+ }
}
}