• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/general.php
  • Класс: CWebDavBase
  • Вызов: CWebDavBase::CheckRights
function CheckRights($method = "", $strong = false, $returnCodeError = false)
{
	if (is_array($method)) return; // TODO: from components - fixit
	if ($method == '')
		$method = $this->http_method;

	$result = true; $errorCode = "";
	if (!array_key_exists($method, $this->allow)) {
		$result = false;
		$errorCode = "WD348";
	} elseif ($this->permission < $this->allow[$method]["min_rights"]) {
		$result = false;
		$errorCode = "WD349";
	} elseif ($strong == true && $this->permission < $this->allow[$method]["rights"]) {
		$result = false;
		$errorCode = "WD350";
	}
	return ($returnCodeError === true && $result === false ? $errorCode : $result);
}