• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/integration/report/dashboard/dashboardmanager.php
  • Класс: BitrixCatalogIntegrationReportDashboardDashboardManager
  • Вызов: DashboardManager::getAllowedDashboards
public function getAllowedDashboards(): array
{
	if (isset($this->allowedDashboardList))
	{
		return $this->allowedDashboardList;
	}

	$acceptedDashboards = AccessController::getCurrent()->getPermissionValue(ActionDictionary::ACTION_STORE_ANALYTIC_VIEW);
	if (!$acceptedDashboards)
	{
		return [];
	}

	$allAccepted = in_array(PermissionDictionary::VALUE_VARIATION_ALL, $acceptedDashboards, true);
	$this->allowedDashboardList = [];
	/** @var CatalogDashboard $dashboard */
	foreach ($this->dashboardList as $dashboard)
	{
		if ($allAccepted || in_array($dashboard->getAccessBoardId(), $acceptedDashboards, true))
		{
			$this->allowedDashboardList[] = $dashboard;
		}
	}

	return $this->allowedDashboardList;
}