mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge pull request #6102 from Codinlab/fixes/4622
[Fixes #4622] ShapeTracingFactory Should Not be Activable w/o HttpContext
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user