• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/componentbase.php
  • Класс: BitrixTranslateComponentBase
  • Вызов: ComponentBase::checkPermissionEditPhp
protected function checkPermissionEditPhp()
{
	if (!$this->hasUserPermissionEditSource($this->getUser()))
	{
		if ($this->isAjaxRequest())
		{
			$this->sendJsonResponse(new Error(Loc::getMessage('TRANSLATE_FILTER_ERROR_PHP_EDIT_RIGHTS'), self::STATUS_DENIED));
		}
		else
		{
			$this->addError(new Error(Loc::getMessage('TRANSLATE_FILTER_ERROR_PHP_EDIT_RIGHTS'), self::STATUS_DENIED));
			$this->includeComponentTemplate(self::TEMPLATE_ERROR);
		}

		return false;
	}

	return true;
}