mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixes #4622 : ShapeTracingFactory Should Not be Activable without HttpContext
This commit is contained in:
@@ -41,6 +41,10 @@ namespace Orchard.DesignerTools.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private bool IsActivable() {
|
private bool IsActivable() {
|
||||||
|
// don't activate if no HttpContext
|
||||||
|
if (_workContext.HttpContext == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
// activate on front-end only
|
// activate on front-end only
|
||||||
if (AdminFilter.IsApplied(new RequestContext(_workContext.HttpContext, new RouteData())))
|
if (AdminFilter.IsApplied(new RequestContext(_workContext.HttpContext, new RouteData())))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user