LeadDataSource::preparePermissionSql

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. LeadDataSource
  4. preparePermissionSql
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/widget/data/leaddatasource.php
  • Класс: Bitrix\Crm\Widget\Data\LeadDataSource
  • Вызов: LeadDataSource::preparePermissionSql
protected function preparePermissionSql()
{
	if($this->permissionSql !== null)
	{
		return $this->permissionSql;
	}

	if(\CCrmPerms::IsAdmin($this->userID))
	{
		$this->permissionSql = '';
	}
	else
	{
		$this->permissionSql = \CCrmPerms::BuildSql(
			\CCrmOwnerType::LeadName,
			'',
			'READ',
			array('RAW_QUERY' => true, 'PERMS'=> \CCrmPerms::GetUserPermissions($this->userID))
		);
	}
	return $this->permissionSql;
}

Добавить комментарий