CCrmRole::GetRoleByAttr

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRole
  4. GetRoleByAttr
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_role.php
  • Класс: \CCrmRole
  • Вызов: CCrmRole::GetRoleByAttr
public function GetRoleByAttr($permEntity, $permAttr = CCrmPerms::PERM_SELF, $permType = 'READ')
{
	global $DB;
	$permEntity = $DB->ForSql($permEntity);
	$permAttr = $DB->ForSql($permAttr);
	$permType = $DB->ForSql($permType);
	$sSql = "
		SELECT ROLE_ID
		FROM b_crm_role_perms
		WHERE ENTITY = '$permEntity' AND PERM_TYPE = '$permType' AND ATTR >= '$permAttr'";

	$obRes = $DB->Query($sSql, false, 'FILE: '.__FILE__.'
LINE: '.__LINE__); $arResult = array(); while ($arRow = $obRes->Fetch()) $arResult[] = $arRow['ROLE_ID']; return $arResult; }

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