Fixes #4622 : ShapeTracingFactory Should Not be Activable without HttpContext

This commit is contained in:
Thierry Fleury 2015-11-29 16:24:02 +01:00
parent af76305088
commit 044bb2fdaf

View File

@ -41,6 +41,10 @@ namespace Orchard.DesignerTools.Services {
}
private bool IsActivable() {
// don't activate if no HttpContext
if (_workContext.HttpContext == null)
return false;
// activate on front-end only
if (AdminFilter.IsApplied(new RequestContext(_workContext.HttpContext, new RouteData())))
return false;