From 56eea6a626c439e631433500357ced09f72a6fb2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 8 Jul 2013 12:13:21 -0400 Subject: added some user access settings --- MediaBrowser.Server.Implementations/Session/SessionManager.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MediaBrowser.Server.Implementations/Session') diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index dda9658d4..d9f28915a 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -101,6 +101,11 @@ namespace MediaBrowser.Server.Implementations.Session /// user public Task LogConnectionActivity(string clientType, string deviceId, string deviceName, User user) { + if (user != null && user.Configuration.IsDisabled) + { + throw new UnauthorizedAccessException(string.Format("The {0} account is currently disabled. Please consult with your administrator.", user.Name)); + } + var activityDate = DateTime.UtcNow; GetConnection(clientType, deviceId, deviceName, user).LastActivityDate = activityDate; -- cgit v1.2.3