cancel
Showing results for 
Search instead for 
Did you mean: 

Check permissions but skip the Lock policy

Nelson_Silva
Confirmed Champ
Confirmed Champ

I'm playing with a realtime edit framework for Nuxeo, the plan is to have a real time edit button to start a collaborative editing session so I'm locking the document to prevent concurrent changes, besides those made in the session of course. What i'd like to know is if there's an easy way to check for permissions and skip the Lock policy check? Once a document is locked and a real time edit session's started users should be redirected to the current editing session but i need to check for permissions... I ended up copying the SecurityService.hasPermission method and removing the policy check but I was wondering if there's an easier way ...

1 REPLY 1

Laurent_Doguin
Star Collaborator
Star Collaborator

Hi Nelson,

If you only want to remove the lock policy check, there's an extension point for security policies:

http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.core.secu...

This should do the trick:

    <extension point="policies" target="org.nuxeo.ecm.core.security.SecurityService">
        <policy enabled="false" name="lock" />
    </extension>
Getting started

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.