Beispiel #1
0
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            bool Pass = false;

            if (Authorize.GetUser() == null)
            {
                httpContext.Response.StatusCode = 401;//无权限状态码
                Pass = false;
            }
            else
            {
                Pass = true;
            }
            return(Pass);
        }