24 if(!$this->checkHasAccess(
$userId))
38 if(!$this->checkHasAccess(
$userId))
55 ||
$USER->canDoOperation(
'bitrix24_config')
68 private function checkHasAccess(
$userId)
72 if($this->hasAccess ===
null)
78 ||
$USER->canDoOperation(
'bitrix24_config')
81 $this->hasAccess =
true;
86 $workflowIntegerId = intval($this->
getId());
87 if ($workflowIntegerId > 0)
94 $currentUserId = (int)
$USER->getId();
96 if (in_array($currentUserId, $participants))
98 $this->hasAccess =
true;
105 && $currentUserId === (int) $state[
'STARTED_BY']
111 $this->hasAccess =
false;
116 $documentId = \CBPStateService::GetStateDocumentId($workflowId);
117 $elementQuery = \CIBlockElement::getList(
118 array(),
array(
"ID" => $documentId[2]),
false,
false,
array(
"IBLOCK_ID"));
119 $element = $elementQuery->fetch();
120 if ($element[
'IBLOCK_ID'])
122 $this->hasAccess = \CIBlockElementRights::userHasRightTo(
123 $element[
"IBLOCK_ID"], $documentId[2],
"element_read");
130 $this->hasAccess =
false;
134 return $this->hasAccess;
static includeModule($moduleName)