fixed bug with attributes

This commit is contained in:
Shannon Deminick
2013-02-27 00:41:24 +06:00
parent 5df0013406
commit f7cfa507d7
2 changed files with 16 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ using System.Web.Security;
using Umbraco.Web.Security;
using umbraco.cms.businesslogic.member;
using AuthorizeAttribute = System.Web.Mvc.AuthorizeAttribute;
using Umbraco.Core;
namespace Umbraco.Web.Mvc
{
@@ -40,6 +41,13 @@ namespace Umbraco.Web.Mvc
protected override bool AuthorizeCore(HttpContextBase httpContext)
{
if (AllowMembers.IsNullOrWhiteSpace())
AllowMembers = "";
if (AllowGroup.IsNullOrWhiteSpace())
AllowGroup = "";
if (AllowType.IsNullOrWhiteSpace())
AllowType = "";
var members = new List<int>();
foreach (var s in AllowMembers.Split(','))
{

View File

@@ -4,6 +4,7 @@ using System.Web;
using System.Web.Http;
using Umbraco.Web.Security;
using umbraco.cms.businesslogic.member;
using Umbraco.Core;
namespace Umbraco.Web.WebApi
{
@@ -38,6 +39,13 @@ namespace Umbraco.Web.WebApi
protected override bool IsAuthorized(System.Web.Http.Controllers.HttpActionContext actionContext)
{
if (AllowMembers.IsNullOrWhiteSpace())
AllowMembers = "";
if (AllowGroup.IsNullOrWhiteSpace())
AllowGroup = "";
if (AllowType.IsNullOrWhiteSpace())
AllowType = "";
var members = new List<int>();
foreach (var s in AllowMembers.Split(','))
{