• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/lib/security/elementright.php
  • Класс: BitrixListsSecurityElementRight
  • Вызов: ElementRight::canEdit
public function canEdit()
{
	$canEdit = (
		!$this->socnetGroupClosed && ((
			$this->rightParam->getEntityId() > 0 &&
			(
				$this->listsPermission >= CListPermissions::CAN_WRITE ||
				CIBlockElementRights::UserHasRightTo(
					$this->rightParam->getIblockId(), $this->rightParam->getEntityId(), "element_edit")
			)
		)
		|| (
			$this->rightParam->getEntityId() == 0
			&& (
				$this->listsPermission >= CListPermissions::CAN_WRITE ||
				CIBlockSectionRights::UserHasRightTo(
					$this->rightParam->getIblockId(), $this->rightParam->getEntityId(), "section_element_bind")
			)
		))
	);

	if ($canEdit)
	{
		return true;
	}
	else
	{
		$this->errorCollection->setError(new Error("Access denied", self::ACCESS_DENIED));
		return false;
	}
}