Details
-
Bug
-
Status: Closed
-
High
-
Resolution: Fixed
-
None
-
None
-
Sprint 69
Description
The boolean Session.hasPermission(String, String) method was added to JCR 2.0, but isn't intercepted by the Hippo XASessionImpl.
This means that custom permissions checks like hasPermission(<itemPath>, "hippo:editor") will always result in an IllegalArgumentException being thrown by the underlying jackrabbit SessionImpl, like for example the below stacktrace shows:
java.lang.IllegalArgumentException: Unknown actions: [hippo:editor]
at org.apache.jackrabbit.core.SessionImpl.hasPermission(SessionImpl.java:1200)
at org.hippoecm.repository.decorating.SessionDecorator.hasPermission(SessionDecorator.java:375)
at org.hippoecm.repository.impl.WorkflowManagerImpl.checkWorkflowPermission(WorkflowManagerImpl.java:227)
at org.hippoecm.repository.impl.WorkflowManagerImpl.getWorkflowNode(WorkflowManagerImpl.java:157)
at org.hippoecm.repository.impl.WorkflowManagerImpl.getWorkflow(WorkflowManagerImpl.java:351)
(note: the above reported hasPermission call in the stacktrace was injected by myself locally to test this out; the current WorkflowManagerImpl of course uses checkPermission.)
The fix should be simple: just adding the hasPermission method override similar to the checkPermission method