Rights::hasAccessForSite

  1. Bitrix24 API (v. 23.675.0)
  2. landing
  3. Rights
  4. hasAccessForSite
  • Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/rights.php
  • Класс: BitrixLandingRights
  • Вызов: Rights::hasAccessForSite
static function hasAccessForSite($siteId, $accessType, $deleted = false)
{
	static $operations = [];
	$siteId = intval($siteId);

	if (!is_string($accessType))
	{
		return false;
	}

	if (!isset($operations[$siteId]))
	{
		if ($siteId === 0 || !self::isOn() || Site::ping($siteId, $deleted))
		{
			$operations[$siteId] = self::getOperations(
				$siteId,
				self::ENTITY_TYPE_SITE
			);
		}
		else
		{
			$operations[$siteId] = [];
		}
	}

	return in_array($accessType, $operations[$siteId]);
}

Добавить комментарий