Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
pricetyperights.php
1
<?php
2
3
namespace
Bitrix\Catalog\Controller
;
4
5
use
Bitrix\Catalog\Access\AccessController
;
6
use
Bitrix\Catalog\Access\ActionDictionary
;
7
use
Bitrix\Main\Error
;
8
use
Bitrix\Main\Result
;
9
10
trait PriceTypeRights
11
{
15
protected
function
checkReadPermissionEntity(): Result
16
{
17
$r =
new
Result();
18
19
if
(
20
!AccessController::getCurrent()->check(ActionDictionary::ACTION_CATALOG_READ)
21
&& !AccessController::getCurrent()->check(ActionDictionary::ACTION_PRICE_GROUP_EDIT)
22
)
23
{
24
$r->addError(
new
Error
(
'Access Denied'
));
25
}
26
27
return
$r;
28
}
29
33
protected
function
checkModifyPermissionEntity(): Result
34
{
35
$result =
new
Result();
36
37
if
(!AccessController::getCurrent()->check(ActionDictionary::ACTION_PRICE_GROUP_EDIT))
38
{
39
$result->addError(
new
Error
(
'Access Denied'
));
40
}
41
42
return
$result;
43
}
44
}
Bitrix\Catalog\Access\AccessController
Definition
AccessController.php:28
Bitrix\Catalog\Access\ActionDictionary
Definition
ActionDictionary.php:17
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Catalog\Controller
Bitrix\Translate\Error
trait Error
Definition
error.php:11
modules
catalog
lib
controller
pricetyperights.php
Создано системой
1.10.0