• Модуль: rpa
  • Путь к файлу: ~/bitrix/modules/rpa/lib/userpermissions.php
  • Класс: BitrixRpaUserPermissions
  • Вызов: UserPermissions::canViewItem
public function canViewItem(Item $item): bool
{
	if ($this->isAccessDeniedToEverything())
	{
		return false;
	}
	if($item->getCreatedBy() === $this->userId)
	{
		return true;
	}
	if(
		$item->getPreviousStageId() > 0 &&
		($this->canViewItemsInStage($item->getType(), $item->getStageId()) || $this->canViewItemsInStage($item->getType(), $item->getPreviousStageId()))
	)
	{
		return true;
	}

	if($this->canViewItemsInStage($item->getType(), $item->getStageId()))
	{
		return true;
	}

	return false;
}