if (attribute == null) {
return ACCESS_ABSTAIN;
}
Closure<?> closure = (Closure<?>) attribute.getClosure().clone();
closure.setDelegate(new SecuredClosureDelegate(authentication, fi, ctx));
Object result = closure.call();
if (result instanceof Boolean) {
return ((Boolean)result) ? ACCESS_GRANTED : ACCESS_DENIED;
}