Documentation

CanUserOperateDocument

bool
IBPWorkflowDocument::CanUserOperateDocument(
 int operation,
 int userId,
 mixed documentId,
 array arParameters = array()
);

This method verifies permission rights to complete operations with the specified document. The following operations are checked:

  • 0 - view workflow data,
  • 1 - launch workflow,
  • 2 - right to modify a document,
  • 3 - right to view a document.
If the rights are available, then returns true. Otherwise, returns false.

Method parameters

ParameterDescription
operationOperation
userIdUser ID, for which the right to perform operation is verified
documentIdDocument ID code, to which the operation is applied
arParametersAssociative array of auxiliary parameters. It is used to avoid recalculation of the computed values, which are already known at the moment of method call. Keys for the DocumentStates array - workflows statuses array for this document, are deemed as standard, WorkflowId - workflow ID code (if required, operation must be checked on one of workflows). Array can be supplemented by other arbitrary keys.


© «Bitrix24», 2001-2024
Up