How to execute an operation triggered by a user under a service level account?
Hi,
We have an event listener that is triggered by a user action. It runs an operation that changes permission on the asset. We would like to be able to run an operation without giving the users ability to change permission on an asset. The event handler and operation are defined in Java.
Does anyone have a good code snippet to share?
Thank you!
Is UnrestrictedSessionRunner the right solution for this? https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/UnrestrictedSessionRunner.java
I see someone already tried to extend it for a similar task:https://answers.nuxeo.com/general/q/0c56b384bd954a14b1380e3bf3082348/Problems-with-the-class-UnrestrictedSessionRunner