mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-16 01:44:26 +08:00
Fixes #4622 : ShapeTracingFactory Should Not be Activable without HttpContext
This commit is contained in:
parent
af76305088
commit
044bb2fdaf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user