Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
accesschecker.php
1
<?php
2
3
namespace
Bitrix\Sale\Helpers\Rest
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Rest\AccessException
;
7
13
class
AccessChecker
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
}
Bitrix\Main\ModuleManager\isModuleInstalled
static isModuleInstalled($moduleName)
Definition
modulemanager.php:67
Bitrix\Rest\AccessException
Definition
accessexception.php:7
Bitrix\Sale\Helpers\Rest\AccessChecker
Definition
accesschecker.php:14
Bitrix\Sale\Helpers\Rest\AccessChecker\checkAccessPermission
static checkAccessPermission()
Definition
accesschecker.php:18
Bitrix\Main
Bitrix\Sale\Helpers\Rest
Definition
accesschecker.php:3
modules
sale
lib
helpers
rest
accesschecker.php
Создано системой
1.10.0