Hi there
i finally managed to integrate spring security acl. I managed to implement a special JPA variant for the existing jdbc aclservices (but this just as a sidenote). However, i cannot get the following expression to work:
I need to add the returnObject.directSecurityEnabled because i use the expression in a generic service, while only like half of the objects handled by the service have acl entries and the other half rely on their respective parents. This is handled with the following abstract method, overwritten in each bean:Code:@PostAuthorize("returnObject == null " + " or (returnObject.directSecurityEnabled and hasPermission(returnObject, 'READ')) " + " or (!returnObject.directSecurityEnabled and hasPermission(returnObject.root, 'READ'))")
There seems to be an error in the EL because i get the following exception:Code:/** * Does this bean support security? * @return boolean */ public final boolean isSecurityEnabled() { return getSecurityEnabled(); } protected abstract boolean getSecurityEnabled();
Please help me fix this oneCode:java.lang.IllegalArgumentException: Failed to evaluate expression 'returnObject == null or (returnObject.directSecurityEnabled and hasPermission(returnObject, 'READ')) or (!returnObject.directSecurityEnabled and hasPermission(returnObject.root, 'READ'))' at org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean(ExpressionUtils.java:13) ...![]()


Reply With Quote