• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/security/access.php
  • Класс: BitrixSenderSecurityAccess
  • Вызов: Access::handleEvent
static function handleEvent(Event $event)
{
	$eventData = $event->getParameters();
	$action = $eventData['action'];
	[$sectionCode, $actionCode] = self::getSectionAndAction($action);

	$instance = self::getInstance();
	$eventResult = new EventResult(EventResult::SUCCESS);

	try
	{
		$canAccess = $instance->canPerform($sectionCode, $actionCode);
	} catch (ArgumentException $e)
	{
		return $eventResult->forbidAccess();
	}

	if($canAccess)
	{
		return $eventResult->allowAccess();
	}

	return $eventResult->forbidAccess();
}