CCrmPerms::GetEntityGroup

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmPerms
  4. GetEntityGroup
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_perms.php
  • Класс: \CCrmPerms
  • Вызов: CCrmPerms::GetEntityGroup
static function GetEntityGroup($permEntity, $permAttr = self::PERM_NONE, $permType = 'READ')
{
	global $DB;

	$arResult = array();
	$arRole = CCrmRole::GetRoleByAttr($permEntity, $permAttr, $permType);

	if (!empty($arRole))
	{
		$sSql = 'SELECT RELATION FROM b_crm_role_relation WHERE RELATION LIKE \'G%\' AND ROLE_ID IN ('.implode(',', $arRole).')';
		$res = $DB->Query($sSql, false, 'FILE: '.__FILE__.'
LINE: '.__LINE__); while($row = $res->Fetch()) $arResult[] = mb_substr($row['RELATION'], 1); } return $arResult; }

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