Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
accesschecker.php
1<?php
2
4
7
14{
18 public static function checkAccessPermission()
19 {
20 global $APPLICATION, $USER;
21
22 if (Main\ModuleManager::isModuleInstalled('intranet') && Main\Loader::includeModule('crm'))
23 {
24 $crmPerms = new \CCrmPerms($USER->GetID());
25 if (!$crmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE'))
26 {
27 throw new AccessException();
28 }
29 }
30 else
31 {
32 $saleModulePermissions = $APPLICATION::GetGroupRight('sale');
33 if ($saleModulePermissions < 'W')
34 {
35 throw new AccessException();
36 }
37 }
38 }
39}
static isModuleInstalled($moduleName)