diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-08 12:13:21 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-08 12:13:21 -0400 |
| commit | 56eea6a626c439e631433500357ced09f72a6fb2 (patch) | |
| tree | 284404188f48484e4429d7e6c98f8a5bae818b32 /MediaBrowser.Server.Implementations/Session/SessionManager.cs | |
| parent | 6992d311559e7271e1c128b579cb28694b84d67c (diff) | |
added some user access settings
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 5 |
1 files changed, 5 insertions, 0 deletions
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 /// <exception cref="System.ArgumentNullException">user</exception> 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; |
