08-15-2012 01:08 PM
Hi, my nuxeo bundle contains an EventListener that reacts on some events to add additional information to my documents. Now I am in a situation where I want to reject the modifications of a user. So I added a listener reacting on the beforeDocumentModification event. I thought that it might work to use event.markRollback(). But his will result in an error page for the user after modifying the document. Is there a "legal" way to do this?
Thanks, Dirk
08-21-2012 11:41 AM
No, listeners are not designed to be able to cancel things. There would be no way to properly propagate any error or messages back to the user in any case. You must find another mechanism to check that what you're about to do is allowed, before actually doing it.
08-22-2012 05:26 AM
Thanks Florent, does Nuxeo provide an extension point to validate the content of the edit form of my document programmatically before the changes are applied?
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.