• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/permission.php
  • Класс: BitrixTranslatePermission
  • Вызов: Permission::isAllowPath
static function isAllowPath(string $path): bool
{
	static $initFolders;
	if (empty($initFolders))
	{
		$initFolders = TranslateConfig::getInitPath();
		if (empty($initFolders))
		{
			$initFolders = array(TranslateConfig::getDefaultPath());
		}
	}

	$path = (string)$path;
	$allowPath = false;
	foreach ($initFolders as $oneFolder)
	{
		if (mb_strpos($path, $oneFolder) === 0)
		{
			$allowPath = true;
			break;
		}
	}

	return $allowPath;
}