Setting a document as Immutable
I've got a use case where, under certain conditions, a document needs to be read-only. I'm trying to achieve this state programmatically (using a chain/script). As the platform doesn't seem to allow to add the “Immutable” facet using the DocumentModel.addFacet()
, I was wondering which alternative would be recommended:
- by adding an ACE to deny all Write access to everyone;
- by setting the
HiddenInNavigation
facet and putting a proxy to it in its place; - all of the above?
- any other way?
Thanks in advance!
Personally, I would modify the Access Control Entry to deny write access to everyone as it's the cleanest approach. I have done this in a number of scenarios and it works well.
Can the publishing feature help you ? see http://doc.nuxeo.com/x/ZIEk
Published documents are read only.