示例#1
0
 public override ProblemCollection Check(TypeNode type)
 {
     if (type.IsController() && type.Attributes.Any(a => a.Type.FullName == "CDS.Web.Authorization.SkipAuthorizeAttribute"))
     {
         Problems.Add(new Problem(this.GetResolution()));
     }
     return Problems;
 }
示例#2
0
 public override ProblemCollection Check(TypeNode type)
 {
     if (type.IsController() && type.Attributes.Any(a => a.Type.FullName == "CDS.Web.Authorization.SkipAuthorizeAttribute"))
     {
         Problems.Add(new Problem(this.GetResolution()));
     }
     return(Problems);
 }
示例#3
0
        public override ProblemCollection Check(TypeNode type)
        {
            if (type.IsController()) //only applies to controllers
            {
                while (type != null)
                {
                    //MOD: we use a custom attribute here (mostly just to display a friendly error). You may also do something like that.
                    if (type.Attributes.Any(a => a.Type.FullName == "System.Web.Mvc.AuthorizeAttribute"))
                    {
                        return Problems; //it's got a capability check, no worries bra
                    }
                    type = type.BaseType;
                }

                Problems.Add(new Problem(this.GetResolution()));
            }
            return Problems;
        }
示例#4
0
        public override ProblemCollection Check(TypeNode type)
        {
            if (type.IsController()) //only applies to controllers
            {
                while (type != null)
                {
                    //MOD: we use a custom attribute here (mostly just to display a friendly error). You may also do something like that.
                    if (type.Attributes.Any(a => a.Type.FullName == "System.Web.Mvc.AuthorizeAttribute"))
                    {
                        return(Problems); //it's got a capability check, no worries bra
                    }
                    type = type.BaseType;
                }

                Problems.Add(new Problem(this.GetResolution()));
            }
            return(Problems);
        }