Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
CatalogRightsEditRule.php
1
<?php
2
3
namespace
Bitrix\Catalog\Access\Rule
;
4
5
use
Bitrix\Catalog\Config\Feature
;
6
use
Bitrix\Main\Access\AccessibleItem
;
7
8
class
CatalogRightsEditRule
extends
BaseRule
9
{
17
public
function
execute
(
AccessibleItem
$item =
null
, $params =
null
): bool
18
{
19
if
(!Feature::isAccessControllerCheckingEnabled())
20
{
21
return
false
;
22
}
23
24
return
parent::execute($item, $params);
25
}
26
27
public
function
getPermissionValue
($params): ?int
28
{
29
if
($this->user->isAdmin())
30
{
31
return
1;
32
}
33
34
return
parent::getPermissionValue($params);
35
}
36
}
Bitrix\Catalog\Access\Rule\BaseRule
Definition
BaseRule.php:13
Bitrix\Catalog\Access\Rule\CatalogRightsEditRule
Definition
CatalogRightsEditRule.php:9
Bitrix\Catalog\Access\Rule\CatalogRightsEditRule\execute
execute(AccessibleItem $item=null, $params=null)
Definition
CatalogRightsEditRule.php:17
Bitrix\Catalog\Access\Rule\CatalogRightsEditRule\getPermissionValue
getPermissionValue($params)
Definition
CatalogRightsEditRule.php:27
Bitrix\Catalog\Config\Feature
Definition
feature.php:16
Bitrix\Main\Access\AccessibleItem
Definition
accessibleitem.php:13
Bitrix\Catalog\Access\Rule
Definition
BaseRule.php:3
modules
catalog
lib
Access
Rule
CatalogRightsEditRule.php
Создано системой
1.10.0