This commit is contained in:
Luke Pulverenti
2017-08-30 14:52:29 -04:00
parent 8de80d43ba
commit 0f23c7cfc1
14 changed files with 117 additions and 80 deletions

View File

@@ -7,7 +7,6 @@ using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Security;
using MediaBrowser.Controller.Session;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Emby.Server.Implementations.HttpServer.Security
@@ -78,7 +77,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
if (!IsExemptFromRoles(auth, authAttribtues, info))
{
var roles = authAttribtues.GetRoles().ToList();
var roles = authAttribtues.GetRoles();
ValidateRoles(roles, user);
}
@@ -162,7 +161,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
return false;
}
private void ValidateRoles(List<string> roles, User user)
private void ValidateRoles(string[] roles, User user)
{
if (roles.Contains("admin", StringComparer.OrdinalIgnoreCase))
{