Documentation

CanUserOperateDocumentType

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

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

  • 2 - access rights to modify a document,
  • 4 - access right to modify workflow templates for this type of document.
If the access rights are available, then returns true. Otherwise, returns false.

Method parameters

ParameterDescription
operationOperation
userIdUser ID code for which the access right to complete operations 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