public override Task ExecuteAsync(OctoContext context)
        {
            if (context.User == null)
            {
                context.Response.StatusCode = 401;
                return(Task.FromResult(0));
            }

            return(base.ExecuteAsync(context));
        }
示例#2
0
        public virtual Task ExecuteAsync(OctoContext context)
        {
            if (!ConfigurationStore.GetIsEnabled())
            {
                context.Response.StatusCode = 400;
                return(Task.FromResult(0));
            }

            return(Action.ExecuteAsync(context));
        }
        public override Task ExecuteAsync(OctoContext context)
        {
            if (context.User == null ||
                !authorizationChecker.Value.IsCurrentUserAdministrator())
            {
                context.Response.StatusCode = 401;
                return(Task.FromResult(0));
            }

            return(base.ExecuteAsync(context));
        }