Check whether CMIS document can be modified by user

68 Views Asked by At

I have some code that downloads a CMIS document:

contentStream = remoteDocument.getContentStream();

What is the most efficient way to check whether the current CMIS user has write access to this document's data content or not?

Preferably without making additional CMIS requests.

1

There are 1 best solutions below

0
Nicolas Raoul On

AllowableActions.Actions has the information:

bool writeable = document.AllowableActions.Actions.Contains(
  PermissionMappingKeys.CanSetContentDocument)

If there is anything more efficient I would love to hear about it, though.