Skip to content

Commit c581b45

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into develop
2 parents 38f56d4 + 2f74dea commit c581b45

File tree

185 files changed

+293
-299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+293
-299
lines changed

app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
public function getAllOptions()
3939
{
4040
if (!$this->_options) {
41-
$this->_options = $this->_store->getWebsiteValuesForForm(true, true);
41+
$this->_options = $this->_store->getWebsiteValuesForForm(false, true);
4242
}
4343

4444
return $this->_options;

app/code/Magento/Integration/Model/Oauth/Token/Factory.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

app/code/Magento/Integration/Model/Oauth/Token/Provider.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Provider implements TokenProviderInterface
1717
protected $_consumerFactory;
1818

1919
/**
20-
* @var \Magento\Integration\Model\Oauth\Token\Factory
20+
* @var \Magento\Integration\Model\Oauth\TokenFactory
2121
*/
2222
protected $_tokenFactory;
2323

@@ -31,30 +31,22 @@ class Provider implements TokenProviderInterface
3131
*/
3232
protected $_date;
3333

34-
/**
35-
* @var Token
36-
*/
37-
protected $token;
38-
3934
/**
4035
* @param \Magento\Integration\Model\Oauth\Consumer\Factory $consumerFactory
41-
* @param \Magento\Integration\Model\Oauth\Token\Factory $tokenFactory
36+
* @param \Magento\Integration\Model\Oauth\TokenFactory $tokenFactory
4237
* @param \Magento\Integration\Helper\Oauth\Data $dataHelper
4338
* @param \Magento\Framework\Stdlib\DateTime\DateTime $date
44-
* @param Token $token
4539
*/
4640
public function __construct(
4741
\Magento\Integration\Model\Oauth\Consumer\Factory $consumerFactory,
48-
\Magento\Integration\Model\Oauth\Token\Factory $tokenFactory,
42+
\Magento\Integration\Model\Oauth\TokenFactory $tokenFactory,
4943
\Magento\Integration\Helper\Oauth\Data $dataHelper,
50-
\Magento\Framework\Stdlib\DateTime\DateTime $date,
51-
Token $token
44+
\Magento\Framework\Stdlib\DateTime\DateTime $date
5245
) {
5346
$this->_consumerFactory = $consumerFactory;
5447
$this->_tokenFactory = $tokenFactory;
5548
$this->_dataHelper = $dataHelper;
5649
$this->_date = $date;
57-
$this->token = $token;
5850
}
5951

6052
/**
@@ -293,7 +285,9 @@ protected function _getToken($token)
293285
*/
294286
public function getIntegrationTokenByConsumerId($consumerId)
295287
{
296-
$token = $this->token->loadByConsumerIdAndUserType($consumerId, UserContextInterface::USER_TYPE_INTEGRATION);
288+
/** @var \Magento\Integration\Model\Oauth\Token $token */
289+
$token = $this->_tokenFactory->create();
290+
$token->loadByConsumerIdAndUserType($consumerId, UserContextInterface::USER_TYPE_INTEGRATION);
297291

298292
if (!$token->getId()) {
299293
throw new \Magento\Framework\Oauth\Exception(

app/code/Magento/Integration/Service/V1/AdminTokenService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Framework\Exception\LocalizedException;
1010
use Magento\Integration\Helper\Validator;
1111
use Magento\Integration\Model\Oauth\Token as Token;
12-
use Magento\Integration\Model\Oauth\Token\Factory as TokenModelFactory;
12+
use Magento\Integration\Model\Oauth\TokenFactory as TokenModelFactory;
1313
use Magento\Integration\Model\Resource\Oauth\Token\CollectionFactory as TokenCollectionFactory;
1414
use Magento\User\Model\User as UserModel;
1515

app/code/Magento/Integration/Service/V1/CustomerTokenService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Framework\Exception\LocalizedException;
1010
use Magento\Integration\Helper\Validator;
1111
use Magento\Integration\Model\Oauth\Token as Token;
12-
use Magento\Integration\Model\Oauth\Token\Factory as TokenModelFactory;
12+
use Magento\Integration\Model\Oauth\TokenFactory as TokenModelFactory;
1313
use Magento\Integration\Model\Resource\Oauth\Token\CollectionFactory as TokenCollectionFactory;
1414

1515
class CustomerTokenService implements CustomerTokenServiceInterface

app/code/Magento/Integration/Service/V1/Oauth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Integration\Model\Oauth\Consumer as ConsumerModel;
1010
use Magento\Integration\Model\Oauth\Consumer\Factory as ConsumerFactory;
1111
use Magento\Integration\Model\Oauth\Token as OauthTokenModel;
12-
use Magento\Integration\Model\Oauth\Token\Factory as TokenFactory;
12+
use Magento\Integration\Model\Oauth\TokenFactory as TokenFactory;
1313
use Magento\Integration\Model\Oauth\Token\Provider as TokenProvider;
1414

1515
/**

app/code/Magento/Tax/Controller/Adminhtml/Tax/IgnoreTaxNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function execute()
3939
if ($section) {
4040
try {
4141
$path = 'tax/notification/ignore_' . $section;
42-
$this->_objectManager->get('\Magento\Core\Model\Resource\Config')
42+
$this->_objectManager->get('Magento\Core\Model\Resource\Config')
4343
->saveConfig($path, 1, \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT, 0);
4444
} catch (\Exception $e) {
4545
$this->messageManager->addError($e->getMessage());

app/code/Magento/User/Controller/Adminhtml/User/InvalidateToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function execute()
1818
{
1919
if ($userId = $this->getRequest()->getParam('user_id')) {
2020
/** @var \Magento\Integration\Service\V1\AdminTokenService $tokenService */
21-
$tokenService = $this->_objectManager->get('\Magento\Integration\Service\V1\AdminTokenService');
21+
$tokenService = $this->_objectManager->get('Magento\Integration\Service\V1\AdminTokenService');
2222
try {
2323
$tokenService->revokeAdminAccessToken($userId);
2424
$this->messageManager->addSuccess(__('You have revoked the user\'s tokens.'));

app/code/Magento/User/Controller/Adminhtml/User/Role.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,36 @@ class Role extends \Magento\Backend\App\AbstractAction
4343
*/
4444
protected $_authSession;
4545

46+
/**
47+
* @var \Magento\Framework\Filter\FilterManager
48+
*/
49+
protected $_filterManager;
50+
4651
/**
4752
* @param \Magento\Backend\App\Action\Context $context
4853
* @param \Magento\Framework\Registry $coreRegistry
4954
* @param \Magento\Authorization\Model\RoleFactory $roleFactory
5055
* @param \Magento\User\Model\UserFactory $userFactory
5156
* @param \Magento\Authorization\Model\RulesFactory $rulesFactory
5257
* @param \Magento\Backend\Model\Auth\Session $authSession
58+
* @param \Magento\Framework\Filter\FilterManager $filterManager
5359
*/
5460
public function __construct(
5561
\Magento\Backend\App\Action\Context $context,
5662
\Magento\Framework\Registry $coreRegistry,
5763
\Magento\Authorization\Model\RoleFactory $roleFactory,
5864
\Magento\User\Model\UserFactory $userFactory,
5965
\Magento\Authorization\Model\RulesFactory $rulesFactory,
60-
\Magento\Backend\Model\Auth\Session $authSession
66+
\Magento\Backend\Model\Auth\Session $authSession,
67+
\Magento\Framework\Filter\FilterManager $filterManager
6168
) {
6269
parent::__construct($context);
6370
$this->_coreRegistry = $coreRegistry;
6471
$this->_roleFactory = $roleFactory;
6572
$this->_userFactory = $userFactory;
6673
$this->_rulesFactory = $rulesFactory;
6774
$this->_authSession = $authSession;
75+
$this->_filterManager = $filterManager;
6876
}
6977

7078
/**

app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function execute()
7878
}
7979

8080
try {
81-
$roleName = $this->getRequest()->getParam('rolename', false);
81+
$roleName = $this->_filterManager->removeTags($this->getRequest()->getParam('rolename', false));
8282

8383
$role->setName($roleName)
8484
->setPid($this->getRequest()->getParam('parent_id', false))

0 commit comments

Comments
 (0)