As a developer using the REST API I want the list of allowable operations for a node to reflect it's checked out/locked state and the ability to request the id of working copy node or the original source node so that my client can properly handle checked out and locked content.
- An optional property named isWorkingCopy is available via the include mechanism for node listings
- An optional property named workingCopyId is available via the include mechanism for the originally checked out node, it contains the id of the working copy node
- If the node is not checked out or is a working copy the property will not be present
- An optional property named checkoutSourceId is available via the include mechanism for the working copy node, it contains the id of the node the working copy is related to
- If the node is not a working copy the property will not be present
- The list of allowableOperations for a node includes one or more of the following values depending on the state of the node (see table below):
The table below shows the allowableOperations that should be returned for various node states for a user with write permission or the admin user. All other combinations or if the user only has read only permission, no additional options should be added to allowableOperations.
In additional to the rules above the "delete" allowableOperation should also be removed from working copy nodes and an attempt to delete a working copy node should be prevented as was done in
REPO-160 for individual site folders. The error message should instruct the client to use the cancel checkout endpoint instead.