DedupeDataSource::preparePermissionSql

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

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

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