Skip to content

Commit 26e046f

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-35512
2 parents e9b5475 + 8fd210d commit 26e046f

File tree

314 files changed

+7426
-2648
lines changed

Some content is hidden

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

314 files changed

+7426
-2648
lines changed

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
0.74.0-beta11
2+
=============
3+
* Framework improvements:
4+
* Improved component Bookmarks component in scope of Enhanced Data Grids on CMS
5+
* Improved component Advanced Filtering component in scope of Enhanced Data Grids on CMS
6+
* Fixed bugs:
7+
* Fixed an issue where incorrect keys in REST request body allowed the request to go through successfully
8+
* Fixed an issue where interceptors were Generated with Invalid __wakeup()
9+
* Fixed an issue where redirect on the current page was not working in certain conditions
10+
* Fixed an issue where first store could not be selected on frontend
11+
* Fixed an issue with performance toolkit category creation
12+
* Fixed an issue when columns 'Interval', 'Price Rule' had incorrect values in Coupon Usage report
13+
* Fixed an issue where fatal error occured on Abandoned Carts report grid
14+
* Fixed an issue where it was not possible to add product to shopping cart if Use Secure URLs in Frontend = Yes
15+
* Fixed an issue where email was not required during Guest Checkout
16+
* Fixed broken ability to skip reindex in `bin/magento setup:performance:generate-fixtures` command
17+
* Fixed an issue where `bin/magento indexer:reindex` command failed after `bin/magento setup:di:compile` was run
18+
* Fixed bug with broken JS i18n
19+
* Fixed an issue with wrong value at created_at updated_at fields after quote* save
20+
* Fixed an issue where customer could not be created in backend after adding Image type attribute
21+
* Fixed Sales InvoiceItem and Order data interfaces implementation
22+
* Fixed an issue with performance toolkit medium profile
23+
* Fixed an issue where Excel Formula Injection via CSV/XML export
24+
* Fixed an issue where it was not possible to open the Customers page in backend
25+
* Fixed an issue with internal server error after clicking Continue on Billing information
26+
* Fixed an issue where it was not possible to place order with Fedex shipping method
27+
* Various changes:
28+
* Magento Centinel Removal
29+
* Removed ability to have multi-statement queries
30+
* Test coverage:
31+
* Unit tests coverage
32+
* Covered php code by unit tests after new checkout implementation
33+
* Github issues:
34+
* [#424](https://github.com/magento/magento2/issues/424) -- Combine tier pricing messages into block sentences
35+
* [#1300](https://github.com/magento/magento2/issues/1300), [#1311](https://github.com/magento/magento2/issues/1311), [#1313](https://github.com/magento/magento2/issues/1313) -- Creating product error with startdate
36+
137
0.74.0-beta10
238
=============
339
* Framework improvements:

app/code/Magento/AdminNotification/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-store": "0.74.0-beta10",
7-
"magento/module-backend": "0.74.0-beta10",
8-
"magento/module-media-storage": "0.74.0-beta10",
9-
"magento/framework": "0.74.0-beta10",
6+
"magento/module-store": "0.74.0-beta11",
7+
"magento/module-backend": "0.74.0-beta11",
8+
"magento/module-media-storage": "0.74.0-beta11",
9+
"magento/framework": "0.74.0-beta11",
1010
"lib-libxml": "*",
1111
"magento/magento-composer-installer": "*"
1212
},
1313
"type": "magento2-module",
14-
"version": "0.74.0-beta10",
14+
"version": "0.74.0-beta11",
1515
"license": [
1616
"OSL-3.0",
1717
"AFL-3.0"

app/code/Magento/Authorization/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"description": "Authorization module provides access to Magento ACL functionality.",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-backend": "0.74.0-beta10",
7-
"magento/framework": "0.74.0-beta10",
6+
"magento/module-backend": "0.74.0-beta11",
7+
"magento/framework": "0.74.0-beta11",
88
"magento/magento-composer-installer": "*"
99
},
1010
"type": "magento2-module",
11-
"version": "0.74.0-beta10",
11+
"version": "0.74.0-beta11",
1212
"license": [
1313
"OSL-3.0",
1414
"AFL-3.0"

app/code/Magento/Backend/App/AbstractAction.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action
2222
*/
2323
const SESSION_NAMESPACE = 'adminhtml';
2424

25+
/**
26+
* Authorization level of a basic admin session
27+
*/
28+
const ADMIN_RESOURCE = 'Magento_Backend::admin';
29+
2530
/**
2631
* Array of actions which can be processed without secret key validation
2732
*
@@ -97,7 +102,7 @@ public function __construct(Action\Context $context)
97102
*/
98103
protected function _isAllowed()
99104
{
100-
return true;
105+
return $this->_authorization->isAllowed(self::ADMIN_RESOURCE);
101106
}
102107

103108
/**
@@ -228,14 +233,10 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
228233
*/
229234
protected function _isUrlChecked()
230235
{
231-
return !$this->_actionFlag->get(
232-
'',
233-
self::FLAG_IS_URLS_CHECKED
234-
) && !$this->getRequest()->getParam(
235-
'forwarded'
236-
) && !$this->_getSession()->getIsUrlNotice(
237-
true
238-
) && !$this->_canUseBaseUrl;
236+
return !$this->_actionFlag->get('', self::FLAG_IS_URLS_CHECKED)
237+
&& !$this->getRequest()->isForwarded()
238+
&& !$this->_getSession()->getIsUrlNotice(true)
239+
&& !$this->_canUseBaseUrl;
239240
}
240241

241242
/**

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -147,46 +147,25 @@ protected function _processNotLoggedInUser(\Magento\Framework\App\RequestInterfa
147147
if ($request->getPost('login') && $this->_performLogin($request)) {
148148
$isRedirectNeeded = $this->_redirectIfNeededAfterLogin($request);
149149
}
150-
if (!$isRedirectNeeded && !$request->getParam('forwarded')) {
150+
if (!$isRedirectNeeded && !$request->isForwarded()) {
151151
if ($request->getParam('isIframe')) {
152-
$request->setParam(
153-
'forwarded',
154-
true
155-
)->setRouteName(
156-
'adminhtml'
157-
)->setControllerName(
158-
'auth'
159-
)->setActionName(
160-
'deniedIframe'
161-
)->setDispatched(
162-
false
163-
);
152+
$request->setForwarded(true)
153+
->setRouteName('adminhtml')
154+
->setControllerName('auth')
155+
->setActionName('deniedIframe')
156+
->setDispatched(false);
164157
} elseif ($request->getParam('isAjax')) {
165-
$request->setParam(
166-
'forwarded',
167-
true
168-
)->setRouteName(
169-
'adminhtml'
170-
)->setControllerName(
171-
'auth'
172-
)->setActionName(
173-
'deniedJson'
174-
)->setDispatched(
175-
false
176-
);
158+
$request->setForwarded(true)
159+
->setRouteName('adminhtml')
160+
->setControllerName('auth')
161+
->setActionName('deniedJson')
162+
->setDispatched(false);
177163
} else {
178-
$request->setParam(
179-
'forwarded',
180-
true
181-
)->setRouteName(
182-
'adminhtml'
183-
)->setControllerName(
184-
'auth'
185-
)->setActionName(
186-
'login'
187-
)->setDispatched(
188-
false
189-
);
164+
$request->setForwarded(true)
165+
->setRouteName('adminhtml')
166+
->setControllerName('auth')
167+
->setActionName('login')
168+
->setDispatched(false);
190169
}
191170
}
192171
}

app/code/Magento/Backend/Test/Unit/App/Action/Plugin/AuthenticationTest.php

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,78 @@ public function testAroundDispatchProlongStorage()
8484

8585
$this->assertEquals($expectedResult, $this->plugin->aroundDispatch($subject, $proceed, $request));
8686
}
87+
88+
/**
89+
* Calls aroundDispatch to access protected method _processNotLoggedInUser
90+
*
91+
* Data provider supplies different possibilities of request parameters and properties
92+
* @dataProvider processNotLoggedInUserDataProvider
93+
*/
94+
public function testProcessNotLoggedInUser($isIFrameParam, $isAjaxParam, $isForwardedFlag)
95+
{
96+
$subject = $this->getMockBuilder('Magento\Backend\Controller\Adminhtml\Index')
97+
->disableOriginalConstructor()
98+
->getMock();
99+
$request = $this->getMockBuilder('Magento\Framework\App\Request\Http')
100+
->disableOriginalConstructor()
101+
->getMock();
102+
$storage = $this->getMockBuilder('Magento\Backend\Model\Auth\Session')
103+
->disableOriginalConstructor()
104+
->getMock();
105+
106+
// Stubs to control the flow of execution in aroundDispatch
107+
$this->auth->expects($this->any())->method('getAuthStorage')->will($this->returnValue($storage));
108+
$request->expects($this->once())->method('getActionName')->will($this->returnValue('non/open/action/name'));
109+
$this->auth->expects($this->any())->method('getUser')->willReturn(false);
110+
$this->auth->expects($this->once())->method('isLoggedIn')->will($this->returnValue(false));
111+
$request->expects($this->any())->method('getPost')->willReturn(false);
112+
113+
// Test cases and expectations based on provided data
114+
$request->expects($this->once())->method('isForwarded')->willReturn($isForwardedFlag);
115+
$getParamCalls = 0;
116+
$actionName = '';
117+
118+
// If forwarded flag is set, getParam never gets called
119+
if (!$isForwardedFlag) {
120+
if ($isIFrameParam) {
121+
$getParamCalls = 1;
122+
$actionName = 'deniedIframe';
123+
} else if ($isAjaxParam) {
124+
$getParamCalls = 2;
125+
$actionName = 'deniedJson';
126+
} else {
127+
$getParamCalls = 2;
128+
$actionName = 'login';
129+
}
130+
}
131+
132+
$requestParams = [
133+
['isIframe', null, $isIFrameParam],
134+
['isAjax', null, $isAjaxParam]
135+
];
136+
137+
$setterCalls = $isForwardedFlag ? 0 : 1;
138+
$request->expects($this->exactly($getParamCalls))->method('getParam')->willReturnMap($requestParams);
139+
$request->expects($this->exactly($setterCalls))->method('setForwarded')->with(true)->willReturnSelf();
140+
$request->expects($this->exactly($setterCalls))->method('setRouteName')->with('adminhtml')->willReturnSelf();
141+
$request->expects($this->exactly($setterCalls))->method('setControllerName')->with('auth')->willReturnSelf();
142+
$request->expects($this->exactly($setterCalls))->method('setActionName')->with($actionName)->willReturnSelf();
143+
$request->expects($this->exactly($setterCalls))->method('setDispatched')->with(false)->willReturnSelf();
144+
145+
$expectedResult = 'expectedResult';
146+
$proceed = function ($request) use ($expectedResult) {
147+
return $expectedResult;
148+
};
149+
$this->assertEquals($expectedResult, $this->plugin->aroundDispatch($subject, $proceed, $request));
150+
}
151+
152+
public function processNotLoggedInUserDataProvider()
153+
{
154+
return [
155+
'iFrame' => [true, false, false],
156+
'Ajax' => [false, true, false],
157+
'Neither iFrame nor Ajax' => [false, false, false],
158+
'Forwarded request' => [true, true, true]
159+
];
160+
}
87161
}

app/code/Magento/Backend/composer.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-store": "0.74.0-beta10",
7-
"magento/module-directory": "0.74.0-beta10",
8-
"magento/module-developer": "0.74.0-beta10",
9-
"magento/module-eav": "0.74.0-beta10",
10-
"magento/module-cron": "0.74.0-beta10",
11-
"magento/module-theme": "0.74.0-beta10",
12-
"magento/module-reports": "0.74.0-beta10",
13-
"magento/module-sales": "0.74.0-beta10",
14-
"magento/module-quote": "0.74.0-beta10",
15-
"magento/module-catalog": "0.74.0-beta10",
16-
"magento/module-user": "0.74.0-beta10",
17-
"magento/module-backup": "0.74.0-beta10",
18-
"magento/module-customer": "0.74.0-beta10",
19-
"magento/module-translation": "0.74.0-beta10",
20-
"magento/module-require-js": "0.74.0-beta10",
21-
"magento/module-config": "0.74.0-beta10",
22-
"magento/framework": "0.74.0-beta10",
6+
"magento/module-store": "0.74.0-beta11",
7+
"magento/module-directory": "0.74.0-beta11",
8+
"magento/module-developer": "0.74.0-beta11",
9+
"magento/module-eav": "0.74.0-beta11",
10+
"magento/module-cron": "0.74.0-beta11",
11+
"magento/module-theme": "0.74.0-beta11",
12+
"magento/module-reports": "0.74.0-beta11",
13+
"magento/module-sales": "0.74.0-beta11",
14+
"magento/module-quote": "0.74.0-beta11",
15+
"magento/module-catalog": "0.74.0-beta11",
16+
"magento/module-user": "0.74.0-beta11",
17+
"magento/module-backup": "0.74.0-beta11",
18+
"magento/module-customer": "0.74.0-beta11",
19+
"magento/module-translation": "0.74.0-beta11",
20+
"magento/module-require-js": "0.74.0-beta11",
21+
"magento/module-config": "0.74.0-beta11",
22+
"magento/framework": "0.74.0-beta11",
2323
"magento/magento-composer-installer": "*"
2424
},
2525
"type": "magento2-module",
26-
"version": "0.74.0-beta10",
26+
"version": "0.74.0-beta11",
2727
"license": [
2828
"OSL-3.0",
2929
"AFL-3.0"

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
99
<head>
1010
<title>Magento Admin</title>
11+
<meta name="viewport" content="width=device-width"/>
1112
<link src="requirejs/require.js"/>
1213
<css src="extjs/resources/css/ext-all.css"/>
1314
<css src="extjs/resources/css/ytheme-magento.css"/>

app/code/Magento/Backup/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-store": "0.74.0-beta10",
7-
"magento/module-backend": "0.74.0-beta10",
8-
"magento/module-cron": "0.74.0-beta10",
9-
"magento/framework": "0.74.0-beta10",
6+
"magento/module-store": "0.74.0-beta11",
7+
"magento/module-backend": "0.74.0-beta11",
8+
"magento/module-cron": "0.74.0-beta11",
9+
"magento/framework": "0.74.0-beta11",
1010
"magento/magento-composer-installer": "*"
1111
},
1212
"type": "magento2-module",
13-
"version": "0.74.0-beta10",
13+
"version": "0.74.0-beta11",
1414
"license": [
1515
"OSL-3.0",
1616
"AFL-3.0"

app/code/Magento/Bundle/Pricing/Price/BundleRegularPrice.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface;
1010
use Magento\Catalog\Model\Product;
1111
use Magento\Framework\Pricing\Amount\AmountInterface;
12+
use Magento\Catalog\Pricing\Price\CustomOptionPrice;
13+
use Magento\Bundle\Model\Product\Price;
1214

1315
/**
1416
* Bundle product regular price model
@@ -48,7 +50,13 @@ public function __construct(
4850
public function getAmount()
4951
{
5052
if (null === $this->amount) {
51-
$this->amount = $this->calculator->getMinRegularAmount($this->getValue(), $this->product);
53+
$price = $this->getValue();
54+
if ($this->product->getPriceType() == Price::PRICE_TYPE_FIXED) {
55+
/** @var \Magento\Catalog\Pricing\Price\CustomOptionPrice $customOptionPrice */
56+
$customOptionPrice = $this->priceInfo->getPrice(CustomOptionPrice::PRICE_CODE);
57+
$price += $customOptionPrice->getCustomOptionRange(true);
58+
}
59+
$this->amount = $this->calculator->getMinRegularAmount($price, $this->product);
5260
}
5361
return $this->amount;
5462
}
@@ -61,7 +69,13 @@ public function getAmount()
6169
public function getMaximalPrice()
6270
{
6371
if (null === $this->maximalPrice) {
64-
$this->maximalPrice = $this->calculator->getMaxRegularAmount($this->getValue(), $this->product);
72+
$price = $this->getValue();
73+
if ($this->product->getPriceType() == Price::PRICE_TYPE_FIXED) {
74+
/** @var \Magento\Catalog\Pricing\Price\CustomOptionPrice $customOptionPrice */
75+
$customOptionPrice = $this->priceInfo->getPrice(CustomOptionPrice::PRICE_CODE);
76+
$price += $customOptionPrice->getCustomOptionRange(false);
77+
}
78+
$this->maximalPrice = $this->calculator->getMaxRegularAmount($price, $this->product);
6579
}
6680
return $this->maximalPrice;
6781
}

0 commit comments

Comments
 (0)