...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
- Класс: \CAllCrmDeal
- Вызов: CAllCrmDeal::CheckReadPermission
static function CheckReadPermission($ID = 0, $userPermissions = null, $categoryID = -1, array $options = null) { if(!($userPermissions instanceof CCrmPerms)) { $userPermissions = CCrmPerms::GetCurrentUserPermissions(); } if($categoryID < 0 && $ID > 0) { $categoryID = self::GetCategoryID($ID); } if($categoryID >= 0) { $categoryIDs = array($categoryID); } else { $categoryIDs = DealCategory::getAllIDs(); if($ID > 0) { $ID = 0; } } $entityAttrs = $ID > 0 && is_array($options) && isset($options['ENTITY_ATTRS']) ? $options['ENTITY_ATTRS'] : null; foreach($categoryIDs as $curCategoryID) { $permissionEntity = DealCategory::convertToPermissionEntityType($curCategoryID); if(CCrmAuthorizationHelper::CheckReadPermission($permissionEntity, $ID, $userPermissions, $entityAttrs)) { return true; } } return false; }