Skip to content

Commit 86db2ed

Browse files
committed
2.0.0.0-dev56
* Fixed bugs: * Fixed placing order with PayPal Payments Advanced and Payflow Link * Fixed losing previously assigned categories after saving the product with changed category selector field * Fixed losing of a newly created category assignment after variations generation during Configurable product or Gift Card creation * Fixed the error in order placement with Recurring profile payment * GitHub requests: * [magento#299](magento#299) -- Fix for issue Refactor Mage_Rating_Model_Resource_Rating_Collection * [magento#341](magento#341) -- Replacing simple preg calls with less expensive alternates * Modularity improvements: * Layout page type config moved to library * Design loader moved to library * Theme label moved to library * Themes update: * Reduced amount of templates and layouts in magento_plushe theme * Responsive design improvements * Integrity improvements: * Covered all Magento classes with argument sequence validator * Added arguments type duplication validator * Implemented API Integration UX flows: * Ability to create and edit API Integrations * Ability to delete API integrations that were not created using configuration files * Removed System REST menu item and all associated UX flows: * Users, Roles, and Webhook Subscriptions sub-menu items were removed * Removed the Webhook module
1 parent 28dcec2 commit 86db2ed

File tree

1,024 files changed

+5777
-33033
lines changed

Some content is hidden

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

1,024 files changed

+5777
-33033
lines changed

CHANGELOG.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1+
2.0.0.0-dev56
2+
=============
3+
* Fixed bugs:
4+
* Fixed placing order with PayPal Payments Advanced and Payflow Link
5+
* Fixed losing previously assigned categories after saving the product with changed category selector field
6+
* Fixed losing of a newly created category assignment after variations generation during Configurable product or Gift Card creation
7+
* Fixed the error in order placement with Recurring profile payment
8+
* GitHub requests:
9+
* [#299](https://github.com/magento/magento2/pull/299) -- Fix for issue Refactor Mage_Rating_Model_Resource_Rating_Collection
10+
* [#341](https://github.com/magento/magento2/pull/341) -- Replacing simple preg calls with less expensive alternates
11+
* Modularity improvements:
12+
* Layout page type config moved to library
13+
* Design loader moved to library
14+
* Theme label moved to library
15+
* Themes update:
16+
* Reduced amount of templates and layouts in magento_plushe theme
17+
* Responsive design improvements
18+
* Integrity improvements:
19+
* Covered all Magento classes with argument sequence validator
20+
* Added arguments type duplication validator
21+
* Implemented API Integration UX flows:
22+
* Ability to create and edit API Integrations
23+
* Ability to delete API integrations that were not created using configuration files
24+
* Removed System REST menu item and all associated UX flows:
25+
* Users, Roles, and Webhook Subscriptions sub-menu items were removed
26+
* Removed the Webhook module
27+
128
2.0.0.0-dev55
229
=============
330
* Modularity improvements:
4-
* Session configuration moved to library
5-
* FormKey logic was moved from Session
6-
* SessionIdFlags from Session was removed
31+
* Session configuration is moved to library
32+
* FormKey logic is moved out from Session model
33+
* SessionIdFlags is removed from Session model
734
* Move Page logic to the Theme module and library
8-
* Created integration module UX
35+
* Created UX for the Integration module
936
* Created authorization service (Magento_Authz module)
37+
* Implemented an API Authz check in the Webapi framework
1038
* Fixed bugs:
1139
* Fixed the issue that prevented a customer group's shopping cart rules from applying properly to prices. The issue occurred when a customer was manually assigned to a customer group and automatic group assignment was enabled.
1240
* Fixed the bug with schema upgrade scripts not running after installation

app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected function _prepareForm()
174174
// Prepare form
175175
/** @var \Magento\Data\Form $form */
176176
$form = $this->_formFactory->create(array(
177-
'attributes' => array(
177+
'data' => array(
178178
'id' => 'edit_form',
179179
'use_container' => true,
180180
'method' => 'post',

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -53,79 +53,80 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
5353
*/
5454
protected $_storeManager;
5555

56-
/**
57-
* @var \Magento\Sales\Model\OrderFactory
58-
*/
59-
protected $_orderFactory;
60-
6156
/**
6257
* @var \Magento\Sales\Model\QuoteFactory
6358
*/
6459
protected $_quoteFactory;
6560

66-
/**
67-
* @var \Magento\Authorizenet\Model\Directpost\RequestFactory
68-
*/
69-
protected $_requestFactory;
70-
7161
/**
7262
* @var \Magento\Authorizenet\Model\Directpost\Response
7363
*/
7464
protected $_response;
7565

7666
/**
77-
* Construct
78-
*
79-
* @param \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory
80-
* @param \Magento\Paygate\Model\Authorizenet\RequestFactory $parentRequestFactory
81-
* @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
82-
* @param \Magento\Sales\Model\OrderFactory $orderFactory
83-
* @param \Magento\Core\Model\Session\AbstractSession $session
84-
* @param \Magento\Logger $logger
8567
* @param \Magento\Event\ManagerInterface $eventManager
86-
* @param \Magento\Paygate\Helper\Data $paygateData
87-
* @param \Magento\Module\ModuleListInterface $moduleList
88-
* @param \Magento\Core\Model\Store\Config $coreStoreConfig
8968
* @param \Magento\Payment\Helper\Data $paymentData
69+
* @param \Magento\Core\Model\Store\Config $coreStoreConfig
9070
* @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
71+
* @param \Magento\Logger $logger
72+
* @param \Magento\Module\ModuleListInterface $moduleList
9173
* @param \Magento\Core\Model\LocaleInterface $locale
9274
* @param \Magento\Centinel\Model\Service $centinelService
93-
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
75+
* @param \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory
76+
* @param \Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory
77+
* @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
9478
* @param \Magento\Sales\Model\OrderFactory $orderFactory
79+
* @param \Magento\Core\Model\Session\AbstractSession $session
80+
* @param \Magento\Paygate\Helper\Data $paygateData
81+
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
9582
* @param \Magento\Sales\Model\QuoteFactory $quoteFactory
96-
* @param \Magento\Authorizenet\Model\Directpost\RequestFactory $requestFactory
83+
* @param \Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory
9784
* @param \Magento\Authorizenet\Model\Directpost\Response $response
9885
* @param array $data
86+
*
87+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
9988
*/
10089
public function __construct(
101-
\Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory,
102-
\Magento\Paygate\Model\Authorizenet\RequestFactory $parentRequestFactory,
103-
\Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
104-
\Magento\Sales\Model\OrderFactory $orderFactory,
105-
\Magento\Core\Model\Session\AbstractSession $session,
106-
\Magento\Logger $logger,
10790
\Magento\Event\ManagerInterface $eventManager,
108-
\Magento\Paygate\Helper\Data $paygateData,
109-
\Magento\Module\ModuleListInterface $moduleList,
110-
\Magento\Core\Model\Store\Config $coreStoreConfig,
11191
\Magento\Payment\Helper\Data $paymentData,
92+
\Magento\Core\Model\Store\Config $coreStoreConfig,
11293
\Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
94+
\Magento\Logger $logger,
95+
\Magento\Module\ModuleListInterface $moduleList,
11396
\Magento\Core\Model\LocaleInterface $locale,
11497
\Magento\Centinel\Model\Service $centinelService,
115-
\Magento\Core\Model\StoreManagerInterface $storeManager,
98+
\Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory,
99+
\Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory,
100+
\Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
116101
\Magento\Sales\Model\OrderFactory $orderFactory,
102+
\Magento\Core\Model\Session\AbstractSession $session,
103+
\Magento\Paygate\Helper\Data $paygateData,
104+
\Magento\Core\Model\StoreManagerInterface $storeManager,
117105
\Magento\Sales\Model\QuoteFactory $quoteFactory,
118-
\Magento\Authorizenet\Model\Directpost\RequestFactory $requestFactory,
106+
\Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory,
119107
\Magento\Authorizenet\Model\Directpost\Response $response,
120108
array $data = array()
121109
) {
122-
parent::__construct($cardsFactory, $parentRequestFactory, $resultFactory, $orderFactory, $session,
123-
$logger, $eventManager, $paygateData, $moduleList, $coreStoreConfig, $paymentData,
124-
$logAdapterFactory, $locale, $centinelService, $data);
110+
parent::__construct(
111+
$eventManager,
112+
$paymentData,
113+
$coreStoreConfig,
114+
$logAdapterFactory,
115+
$logger,
116+
$moduleList,
117+
$locale,
118+
$centinelService,
119+
$cardsFactory,
120+
$requestFactory,
121+
$resultFactory,
122+
$orderFactory,
123+
$session,
124+
$paygateData,
125+
$data
126+
);
125127
$this->_storeManager = $storeManager;
126-
$this->_orderFactory = $orderFactory;
127128
$this->_quoteFactory = $quoteFactory;
128-
$this->_requestFactory = $requestFactory;
129+
$this->_requestFactory = $directRequestFactory;
129130
$this->_response = $response;
130131
}
131132

app/code/Magento/Authorizenet/Model/Directpost/Session.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
3939
* @param \Magento\Core\Model\Session\Context $context
4040
* @param \Magento\Session\SidResolverInterface $sidResolver
4141
* @param \Magento\Session\Config\ConfigInterface $sessionConfig
42+
* @param null $sessionName
4243
* @param array $data
43-
* @param string|null $sessionName
4444
*/
4545
public function __construct(
4646
\Magento\Core\Model\Session\Context $context,
4747
\Magento\Session\SidResolverInterface $sidResolver,
4848
\Magento\Session\Config\ConfigInterface $sessionConfig,
49-
array $data = array(),
50-
$sessionName = null
49+
$sessionName = null,
50+
array $data = array()
5151
) {
5252
parent::__construct($context, $sidResolver, $sessionConfig, $data);
5353
$this->start('authorizenet_directpost', $sessionName);

app/code/Magento/Authz/Service/AuthorizationV1.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,23 @@ public function getAllowedResources(UserIdentifier $userIdentifier)
192192
return $allowedResources;
193193
}
194194

195+
/**
196+
* {@inheritdoc}
197+
*/
198+
public function removePermissions(UserIdentifier $userIdentifier)
199+
{
200+
try {
201+
$this->_deleteRole($userIdentifier);
202+
} catch (ServiceException $e) {
203+
throw $e;
204+
} catch (\Exception $e) {
205+
$this->_logger->logException($e);
206+
throw new ServiceException(
207+
__('Error happened while deleting role and permissions. Check exception log for details.')
208+
);
209+
}
210+
}
211+
195212
/**
196213
* Create new ACL role.
197214
*
@@ -223,6 +240,28 @@ protected function _createRole($userIdentifier)
223240
return $role;
224241
}
225242

243+
/**
244+
* Remove an ACL role. This deletes the cascading permissions
245+
*
246+
* @param UserIdentifier $userIdentifier
247+
* @return Role
248+
* @throws \LogicException
249+
*/
250+
protected function _deleteRole($userIdentifier)
251+
{
252+
$userType = $userIdentifier->getUserType();
253+
$userId = $userIdentifier->getUserId();
254+
switch ($userType) {
255+
case UserIdentifier::USER_TYPE_INTEGRATION:
256+
$roleName = $userType . $userId;
257+
break;
258+
default:
259+
throw new \LogicException("Unknown user type: '{$userType}'.");
260+
}
261+
$role = $this->_roleFactory->create()->load($roleName, 'role_name');
262+
return $role->delete();
263+
}
264+
226265
/**
227266
* Identify user role from user identifier.
228267
*

app/code/Magento/Authz/Service/AuthorizationV1Interface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,12 @@ public function isAllowed($resources, UserIdentifier $userIdentifier = null);
6969
* @throws ServiceException
7070
*/
7171
public function getAllowedResources(UserIdentifier $userIdentifier);
72+
73+
/**
74+
* Remove user role and associated permissions.
75+
*
76+
* @param UserIdentifier $userIdentifier
77+
* @throws ServiceException
78+
*/
79+
public function removePermissions(UserIdentifier $userIdentifier);
7280
}

app/code/Magento/Backend/App/Action/Context.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ class Context extends \Magento\App\Action\Context
8181
* @param \Magento\App\ResponseInterface $response
8282
* @param \Magento\ObjectManager $objectManager
8383
* @param \Magento\Event\ManagerInterface $eventManager
84-
* @param \Magento\Backend\Model\Session $session
8584
* @param \Magento\UrlInterface $url
8685
* @param \Magento\App\Response\RedirectInterface $redirect
8786
* @param \Magento\App\ActionFlag $actionFlag
8887
* @param \Magento\App\ViewInterface $view
88+
* @param \Magento\Backend\Model\Session $session
8989
* @param \Magento\AuthorizationInterface $authorization
9090
* @param \Magento\Backend\Model\Auth $auth
9191
* @param \Magento\Backend\Helper\Data $helper
@@ -100,11 +100,11 @@ public function __construct(
100100
\Magento\App\ResponseInterface $response,
101101
\Magento\ObjectManager $objectManager,
102102
\Magento\Event\ManagerInterface $eventManager,
103-
\Magento\Backend\Model\Session $session,
104103
\Magento\UrlInterface $url,
105104
\Magento\App\Response\RedirectInterface $redirect,
106105
\Magento\App\ActionFlag $actionFlag,
107106
\Magento\App\ViewInterface $view,
107+
\Magento\Backend\Model\Session $session,
108108
\Magento\AuthorizationInterface $authorization,
109109
\Magento\Backend\Model\Auth $auth,
110110
\Magento\Backend\Helper\Data $helper,
@@ -114,16 +114,8 @@ public function __construct(
114114
\Magento\Core\Model\LocaleInterface $locale,
115115
$canUseBaseUrl = false
116116
) {
117-
parent::__construct(
118-
$request,
119-
$response,
120-
$objectManager,
121-
$eventManager,
122-
$url,
123-
$redirect,
124-
$actionFlag,
125-
$view
126-
);
117+
parent::__construct($request, $response, $objectManager, $eventManager, $url, $redirect, $actionFlag, $view);
118+
127119
$this->_session = $session;
128120
$this->_authorization = $authorization;
129121
$this->_auth = $auth;

app/code/Magento/Backend/App/Router/DefaultRouter.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ class DefaultRouter extends \Magento\Core\App\Router\Base
4444
protected $_coreConfig;
4545

4646
/**
47-
* @param \Magento\Core\Model\Config $coreConfig
4847
* @param \Magento\App\ActionFactory $actionFactory
4948
* @param \Magento\App\DefaultPathInterface $defaultPath
5049
* @param \Magento\App\ResponseFactory $responseFactory
5150
* @param \Magento\App\Route\ConfigInterface $routeConfig
5251
* @param \Magento\App\State $appState
53-
* @param \Magento\Core\Model\Url|\Magento\UrlInterface $url
54-
* @param \Magento\Core\Model\StoreManager|\Magento\Core\Model\StoreManagerInterface $storeManager
52+
* @param \Magento\UrlInterface $url
53+
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
5554
* @param \Magento\Core\Model\Store\Config $storeConfig
5655
* @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo
57-
* @param $routerId
56+
* @param string $routerId
57+
* @param \Magento\Core\Model\Config $coreConfig
5858
* @param \Magento\Backend\App\ConfigInterface $backendConfig
59-
* @throws \InvalidArgumentException
59+
*
60+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6061
*/
6162
public function __construct(
62-
\Magento\Core\Model\Config $coreConfig,
6363
\Magento\App\ActionFactory $actionFactory,
6464
\Magento\App\DefaultPathInterface $defaultPath,
6565
\Magento\App\ResponseFactory $responseFactory,
@@ -70,11 +70,20 @@ public function __construct(
7070
\Magento\Core\Model\Store\Config $storeConfig,
7171
\Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo,
7272
$routerId,
73+
\Magento\Core\Model\Config $coreConfig,
7374
\Magento\Backend\App\ConfigInterface $backendConfig
7475
) {
7576
parent::__construct(
76-
$actionFactory, $defaultPath, $responseFactory, $routeConfig, $appState, $url, $storeManager, $storeConfig,
77-
$urlSecurityInfo, $routerId
77+
$actionFactory,
78+
$defaultPath,
79+
$responseFactory,
80+
$routeConfig,
81+
$appState,
82+
$url,
83+
$storeManager,
84+
$storeConfig,
85+
$urlSecurityInfo,
86+
$routerId
7887
);
7988
$this->_coreConfig = $coreConfig;
8089
$this->_backendConfig = $backendConfig;

app/code/Magento/Backend/Block/Context.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ class Context extends \Magento\View\Element\Context
5151
* @param \Magento\View\Url $viewUrl
5252
* @param \Magento\View\ConfigInterface $viewConfig
5353
* @param \Magento\App\Cache\StateInterface $cacheState
54-
* @param \Magento\AuthorizationInterface $authorization
5554
* @param \Magento\Logger $logger
5655
* @param \Magento\Core\Model\App $app
5756
* @param \Magento\Escaper $escaper
5857
* @param \Magento\Filter\FilterManager $filterManager
5958
* @param \Magento\Core\Model\LocaleInterface $locale
59+
* @param \Magento\AuthorizationInterface $authorization
6060
* @param array $data
61-
*
61+
*
6262
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
6363
*/
6464
public function __construct(
@@ -77,12 +77,12 @@ public function __construct(
7777
\Magento\View\Url $viewUrl,
7878
\Magento\View\ConfigInterface $viewConfig,
7979
\Magento\App\Cache\StateInterface $cacheState,
80-
\Magento\AuthorizationInterface $authorization,
8180
\Magento\Logger $logger,
8281
\Magento\Core\Model\App $app,
8382
\Magento\Escaper $escaper,
8483
\Magento\Filter\FilterManager $filterManager,
8584
\Magento\Core\Model\LocaleInterface $locale,
85+
\Magento\AuthorizationInterface $authorization,
8686
array $data = array()
8787
) {
8888
$this->_authorization = $authorization;

0 commit comments

Comments
 (0)