CAllCrmDeal::CheckCreatePermission

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmDeal
  4. CheckCreatePermission
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
  • Класс: \CAllCrmDeal
  • Вызов: CAllCrmDeal::CheckCreatePermission
static function CheckCreatePermission($userPermissions = null, $categoryID = -1)
{
	if($categoryID >= 0)
	{
		$categoryIDs = array($categoryID);
	}
	else
	{
		$categoryIDs = DealCategory::getAllIDs();
	}

	foreach($categoryIDs as $curCategoryID)
	{
		$permissionEntity = DealCategory::convertToPermissionEntityType($curCategoryID);
		if(CCrmAuthorizationHelper::CheckCreatePermission($permissionEntity, $userPermissions))
		{
			return true;
		}
	}
	return false;
}

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