/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Webapi/Authorization.php
48 строк
1017 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2016 Adobe * All Rights Reserved. */ namespace Magento\Framework\Webapi; /** * Web API authorization model. * * @api * @since 100.1.0 */ class Authorization { /** * @var \Magento\Framework\AuthorizationInterface * @since 100.1.0 */ protected $authorization; /** * Initialize dependencies. * * @param \Magento\Framework\AuthorizationInterface $authorization */ public function __construct(\Magento\Framework\AuthorizationInterface $authorization) { $this->authorization = $authorization; } /** * Check if all ACL resources are allowed to be accessed by current API user. * * @param string[] $aclResources * @return bool * @since 100.1.0 */ public function isAllowed($aclResources) { foreach ($aclResources as $resource) { if (!$this->authorization->isAllowed($resource)) { return false; } } return true; } }