Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
mode.php
1<?php
2
4
10
12{
16 public function statusAction(): ?string
17 {
18 if (
19 AccessController::getCurrent()->check(Controller::CATALOG_STORE)
20 || AccessController::getCurrent()->check(Controller::CATALOG_READ)
21 )
22 {
23 return Catalog\Config\State::isUsedInventoryManagement() ? 'Y' : 'N';
24 }
25
26 $this->addError(new \Bitrix\Main\Error('Access denied'));
27
28 return null;
29 }
30
31 protected function getDefaultPreFilters()
32 {
33 return array_merge(
34 parent::getDefaultPreFilters(),
35 [
36 new ActionFilter\Scope(ActionFilter\Scope::REST),
37 ]
38 );
39 }
40}