diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index d24de75cb..fd78d1aaa 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -604,6 +604,16 @@ namespace MediaBrowser.Server.Implementations.Session { var session = GetSessionForRemoteControl(sessionId); + if (session.UserId.HasValue) + { + var user = _userManager.GetUserById(session.UserId.Value); + + if (!user.Configuration.EnableMediaPlayback) + { + throw new ArgumentException(string.Format("{0} is not allowed to play media.", user.Name)); + } + } + var items = command.ItemIds.Select(i => _libraryManager.GetItemById(new Guid(i))) .ToList(); |
