Question How do I enforce page locks, preventing users from overriding them?
Answer By default, when a user starts editing a document, he will put a lock on that document, notifying other users that somebody already is editing the page. This is called pessimistic edit locking, in technical terms. This lock is valid by default for 30 minutes, after which it gets invalidated. Normally, other users can override this lock, forcing the edit action.

In order to disable this override, you must

  • Edit the velocity templates from xwiki/templates/ containing lock checks (search for getLocked or locked)
  • From the corresponding #if checks, remove the && !$force condition
Note that this does not completely prevent overriding locks, since manually calling the /save/ action will still work, but the override is hidden from the UI.
Tags:
Created by Sergiu Dumitriu on 2009/05/09
   

Get Connected