Improved: Set security object on groovy context
In a groovy service to call the security object you need to do : Security security = dispatcher.dispatchContext.security
For simplification, I set the security object in groovy context like dispatcher and delegator to call directly security.hasPermission()
@@ -96,6 +96,7 @@ public final class GroovyEngine extends GenericAsyncEngine {
DispatchContext dctx = dispatcher.getLocalContext(localName);
gContext.put("dctx", dctx);
+ gContext.put("security", dctx.getSecurity());
gContext.put("dispatcher", dctx.getDispatcher());
gContext.put("delegator", dispatcher.getDelegator());
try {
