public virtual void ProcessRequest(HttpContext context) { context.Server.ScriptTimeout = 86400; var verb = context.Request.QueryString["verb"]; var authProvider = UnicornConfigurationManager.AuthenticationProvider; SecurityState securityState; if (authProvider != null) { securityState = UnicornConfigurationManager.AuthenticationProvider.ValidateRequest(new HttpRequestWrapper(HttpContext.Current.Request)); } else securityState = new SecurityState(false, false); // this securitydisabler allows the control panel to execute unfettered when debug compilation is enabled but you are not signed into Sitecore using (new SecurityDisabler()) { var pipelineArgs = new UnicornControlPanelRequestPipelineArgs(verb, new HttpContextWrapper(context), securityState); CorePipeline.Run("unicornControlPanelRequest", pipelineArgs, true); if (pipelineArgs.Response == null) { pipelineArgs.Response = new PlainTextResponse("Not Found", HttpStatusCode.NotFound); } if (securityState.IsAllowed) { context.Response.AddHeader("X-Unicorn-Version", UnicornVersion.Current); } pipelineArgs.Response.Execute(new HttpResponseWrapper(context.Response)); } }
public virtual void ProcessRequest(HttpContext context) { context.Server.ScriptTimeout = 86400; // workaround to allow streaming output without an exception in Sitecore 8.1 Update-3 and later context.Response.Headers["X-Frame-Options"] = "SAMEORIGIN"; var verb = context.Request.QueryString["verb"]; var authProvider = UnicornConfigurationManager.AuthenticationProvider; SecurityState securityState; if (authProvider != null) { securityState = UnicornConfigurationManager.AuthenticationProvider.ValidateRequest(new HttpRequestWrapper(HttpContext.Current.Request)); } else { securityState = new SecurityState(false, false); } // this securitydisabler allows the control panel to execute unfettered when debug compilation is enabled but you are not signed into Sitecore using (new SecurityDisabler()) { var pipelineArgs = new UnicornControlPanelRequestPipelineArgs(verb, new HttpContextWrapper(context), securityState); CorePipeline.Run("unicornControlPanelRequest", pipelineArgs, true); if (pipelineArgs.Response == null) { pipelineArgs.Response = new PlainTextResponse("Not Found", HttpStatusCode.NotFound); } if (securityState.IsAllowed) { context.Response.AddHeader("X-Unicorn-Version", UnicornVersion.Current); } pipelineArgs.Response.Execute(new HttpResponseWrapper(context.Response)); } }
protected virtual IEnumerable<IControlPanelControl> CreateHeaderControls(SecurityState securityState) { yield return new Html5HeadAndStyles(); yield return new Heading(securityState.IsAllowed); }
public ControlPanelPageResponse(SecurityState securityState, params IControlPanelControl[] controls) { _securityState = securityState; _controls = controls; }
protected virtual IEnumerable <IControlPanelControl> CreateHeaderControls(SecurityState securityState) { yield return(new Html5HeadAndStyles()); yield return(new Heading(securityState.IsAllowed)); }
public ControlPanelPageResponse(SecurityState securityState, params IControlPanelControl[] controls) { _securityState = securityState; _controls = controls; }