• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/classes/general/lists.php
  • Класс: CLists
  • Вызов: CLists::OnSharepointCheckAccess
static function OnSharepointCheckAccess($iblock_id)
{
	global $USER;
	$arIBlock = CIBlock::GetArrayByID($iblock_id);
	if($arIBlock)
	{
		//Check if iblock is list
		$arListsPerm = CLists::GetPermission($arIBlock["IBLOCK_TYPE_ID"]);
		if(
			is_array($arListsPerm)
			&& count($arListsPerm)
		)
		{
			//User groups
			$arUserGroups = $USER->GetUserGroupArray();
			//One of lists admins
			if(count(array_intersect($arListsPerm, $arUserGroups)))
				return true;
			else
				return false;
		}
	}
}