diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-10-06 19:58:46 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-10-06 19:58:46 -0400 |
| commit | f02f3222085311b2a2cacab6642ad987a4176e65 (patch) | |
| tree | 9f317e5a3f087d4b4c5e523a8d8552d7d248567e /MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs | |
| parent | a9eed234ba2a366fe014f0cc6f462c3764528948 (diff) | |
remove mono compiler directives
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs index 4b699c018..4d2ee3f39 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Configuration; +using System.Collections.Generic; +using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Session; @@ -57,15 +58,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security } private void ValidateUser(IRequest req, bool allowLocal, - string[] roles) + IEnumerable<string> roles) { - //This code is executed before the service + // This code is executed before the service var auth = AuthorizationContext.GetAuthorizationInfo(req); - if (!string.IsNullOrWhiteSpace(auth.Token) - || _config.Configuration.SecureApps2.Contains(auth.Client ?? string.Empty, StringComparer.OrdinalIgnoreCase)) + if (!allowLocal || !req.IsLocal) { - if (!allowLocal || !req.IsLocal) + if (!_config.Configuration.InsecureApps.Contains(auth.Client ?? string.Empty, StringComparer.OrdinalIgnoreCase)) { SessionManager.ValidateSecurityToken(auth.Token); } |
