...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_perms.php
- Класс: \CCrmPerms
- Вызов: CCrmPerms::GetEntityRelations
static function GetEntityRelations($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 ROLE_ID IN ('.implode(',', $arRole).')'; $res = $DB->Query($sSql, false, 'FILE: '.__FILE__.'
LINE: '.__LINE__); while($row = $res->Fetch()) $arResult[] = $row['RELATION']; } return $arResult; }