diff options
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 6761c272d..394ca69d5 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1007,6 +1007,13 @@ namespace MediaBrowser.Api.Playback throw new InvalidOperationException("You asked for a debug error, you got one."); } + var user = AuthorizationRequestFilterAttribute.GetCurrentUser(Request, UserManager); + + if (user != null && !user.Configuration.EnableMediaPlayback) + { + throw new ArgumentException(string.Format("{0} is not allowed to play media.", user.Name)); + } + var url = Request.PathInfo; if (!request.AudioCodec.HasValue) |
