canWrite()

Determines whether the content in a working copy is editable.

Scrivito.canWrite determines whether any content in a working copy is currently editable. For this to be true, the UI must be present, and the editor must be on a working copy (i.e. not the published content) and be its owner or have the “can edit” permission for it. This check can be used, for example, to prevent editors from changing content through custom editing components or custom dialogs. As opposed to Scrivito.canEdit, canWrite does not take account of workflows.

Returns

booleantrue if any content is editable, otherwise false.

Example