• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/iblock.php
  • Класс: CWebDavIblock
  • Вызов: CWebDavIblock::GetPermission
function GetPermission($type, $id, $op='', $runSymlinkProxy = true)
{
	if ($this->e_rights)
	{
		if ($op === '')
			return $this->GetPermissions($type, $id, $this->IBLOCK_ID);
		else
		{
			if($type == 'SECTION')
			{
				if($runSymlinkProxy)
				{
					list($contextType, $contextEntityId) = $this->getContextData();
					$sectionData = $this->getSectionDataForLinkAnalyze($id);
					//if this element is link.
					if($sectionData && $sectionData['ID'] != $id)
					{
						return self::GetPermission($type, $sectionData['ID'], $op);
					}
				}
			}

			$ibRights = $this->_get_ib_rights_object($type, $id, $this->IBLOCK_ID);
			$result = $ibRights->UserHasRightTo($this->IBLOCK_ID, $id, trim($op));
			return $result;
		}
	}
	else
	{
		return CIBlock::GetPermission($this->IBLOCK_ID);
	}
}