Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
pricetyperights.php
1<?php
2
4
9
10trait 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}