예제 #1
0
        public void OnActionExecuting(ActionExecutingContext context)
        {
            HttpContext httpContext = context.HttpContext;
            string      account     = GetAccountAsync(httpContext).Result;

            if (!_commonAppService.JudgeAuth(account, this.Path))
            {
                context.Result = new ContentResult()
                {
                    Content    = "Resource unavailable - header should not be set",
                    StatusCode = 403
                };
            }
            //throw new System.NotImplementedException();
        }