Skip to content

Commit 7b56529

Browse files
authored
Merge pull request #108 from magento/stabilize-builds
Tests stabilization.
2 parents b179a93 + dc886c3 commit 7b56529

File tree

13 files changed

+132
-101
lines changed

13 files changed

+132
-101
lines changed

app/code/Magento/LoginAsCustomer/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"php": "~7.1.3||~7.2.0||~7.3.0",
66
"magento/framework": "*",
77
"magento/module-customer": "*",
8-
"magento/module-login-as-customer-api": "*",
9-
"magento/module-store": "*"
8+
"magento/module-login-as-customer-api": "*"
109
},
1110
"type": "magento2-module",
1211
"license": [

app/code/Magento/LoginAsCustomer/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<general>
1313
<enabled>0</enabled>
1414
<store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
15-
<secrets_expiration_time>60</secrets_expiration_time>
15+
<authentication_data_expiration_time>60</authentication_data_expiration_time>
1616
</general>
1717
</login_as_customer>
1818
</default>

app/code/Magento/LoginAsCustomerApi/Api/ConfigInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function isEnabled(): bool;
2929
public function isStoreManualChoiceEnabled(): bool;
3030

3131
/**
32-
* Gte authentication data expiration time (in seconds)
32+
* Get authentication data expiration time (in seconds)
3333
*
3434
* @return int
3535
*/

app/code/Magento/LoginAsCustomerLog/composer.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
"require": {
55
"php": "~7.1.3||~7.2.0||~7.3.0",
66
"magento/framework": "*",
7-
"magento/module-login-as-customer-api": "*",
8-
"magento/module-backend": "*",
9-
"magento/module-customer": "*",
10-
"magento/module-sales": "*",
11-
"magento/module-store": "*",
12-
"magento/module-ui": "*",
13-
"magento/module-user": "*"
7+
"magento/module-backend": "*"
148
},
159
"suggest": {
1610
"magento/module-login-as-customer": "*"

app/code/Magento/LoginAsCustomerSales/Plugin/AuthenticateCustomerPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function beforeExecute(
7979
* Mark customer cart as not-guest
8080
*
8181
* @param AuthenticateCustomerInterface $subject
82-
* @param null $result
82+
* @param void $result
8383
* @param AuthenticationDataInterface $authenticationData
8484
* @return void
8585
* @throws LocalizedException

app/code/Magento/LoginAsCustomerSales/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"magento/module-checkout": "*",
99
"magento/module-customer": "*",
1010
"magento/module-quote": "*",
11-
"magento/module-login-as-customer": "*",
1211
"magento/module-user": "*"
1312
},
1413
"suggest": {

app/code/Magento/LoginAsCustomerUi/Controller/Adminhtml/Login/Login.php

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
use Magento\Backend\App\Action;
1111
use Magento\Backend\App\Action\Context;
1212
use Magento\Backend\Model\Auth\Session;
13+
use Magento\Customer\Api\CustomerRepositoryInterface;
14+
use Magento\Framework\App\Action\HttpGetActionInterface;
15+
use Magento\Framework\App\Action\HttpPostActionInterface;
1316
use Magento\Framework\Controller\Result\Redirect;
1417
use Magento\Framework\Controller\ResultFactory;
1518
use Magento\Framework\Controller\ResultInterface;
16-
use Magento\Framework\App\Action\HttpGetActionInterface;
17-
use Magento\Framework\App\Action\HttpPostActionInterface;
18-
use Magento\Customer\Api\CustomerRepositoryInterface;
1919
use Magento\Framework\Exception\LocalizedException;
2020
use Magento\Framework\Exception\NoSuchEntityException;
21+
use Magento\Framework\Url;
2122
use Magento\LoginAsCustomerApi\Api\ConfigInterface;
2223
use Magento\LoginAsCustomerApi\Api\Data\AuthenticationDataInterface;
2324
use Magento\LoginAsCustomerApi\Api\Data\AuthenticationDataInterfaceFactory;
@@ -69,14 +70,20 @@ class Login extends Action implements HttpGetActionInterface, HttpPostActionInte
6970
*/
7071
private $saveAuthenticationData;
7172

73+
/**
74+
* @var Url
75+
*/
76+
private $url;
77+
7278
/**
7379
* @param Context $context
7480
* @param Session $authSession
7581
* @param StoreManagerInterface $storeManager
7682
* @param CustomerRepositoryInterface $customerRepository
7783
* @param ConfigInterface $config
7884
* @param AuthenticationDataInterfaceFactory $authenticationDataFactory
79-
* @param SaveAuthenticationDataInterface $saveAuthenticationData
85+
* @param SaveAuthenticationDataInterface $saveAuthenticationData ,
86+
* @param Url $url
8087
*/
8188
public function __construct(
8289
Context $context,
@@ -85,7 +92,8 @@ public function __construct(
8592
CustomerRepositoryInterface $customerRepository,
8693
ConfigInterface $config,
8794
AuthenticationDataInterfaceFactory $authenticationDataFactory,
88-
SaveAuthenticationDataInterface $saveAuthenticationData
95+
SaveAuthenticationDataInterface $saveAuthenticationData,
96+
Url $url
8997
) {
9098
parent::__construct($context);
9199

@@ -95,6 +103,7 @@ public function __construct(
95103
$this->config = $config;
96104
$this->authenticationDataFactory = $authenticationDataFactory;
97105
$this->saveAuthenticationData = $saveAuthenticationData;
106+
$this->url = $url;
98107
}
99108

100109
/**
@@ -165,9 +174,8 @@ private function getLoginProceedRedirectUrl(string $secret, ?int $storeId): stri
165174
$store = $this->storeManager->getStore($storeId);
166175
}
167176

168-
$redirectUrl = $this->_url
177+
return $this->url
169178
->setScope($store)
170179
->getUrl('loginascustomer/login/index', ['secret' => $secret, '_nosid' => true]);
171-
return $redirectUrl;
172180
}
173181
}

app/code/Magento/LoginAsCustomerUi/ViewModel/Configuration.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Magento\LoginAsCustomerUi\ViewModel;
99

1010
use Magento\Customer\Model\Context;
11-
use Magento\LoginAsCustomer\Model\Config;
1211
use Magento\LoginAsCustomerApi\Api\ConfigInterface;
1312

1413
/**
@@ -17,7 +16,7 @@
1716
class Configuration implements \Magento\Framework\View\Element\Block\ArgumentInterface
1817
{
1918
/**
20-
* @var Config
19+
* @var ConfigInterface
2120
*/
2221
private $config;
2322

app/code/Magento/LoginAsCustomerUi/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"magento/module-backend": "*",
99
"magento/module-customer": "*",
1010
"magento/module-store": "*",
11-
"magento/module-ui": "*",
12-
"magento/module-user": "*"
11+
"magento/module-ui": "*"
1312
},
1413
"suggest": {
1514
"magento/module-login-as-customer": "*"

app/code/Magento/LoginAsCustomerUi/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
99
<system>
10-
<section id="loginascustomer" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
10+
<section id="login_as_customer" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
1111
<class>separator-top</class>
1212
<label>Login As Customer</label>
1313
<tab>customer</tab>
@@ -18,7 +18,7 @@
1818
<label>Enable Extension</label>
1919
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
2020
</field>
21-
<field id="enable_store_view_manual_choice" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
21+
<field id="store_view_manual_choice_enabled" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
2222
<label>Store View To Login In</label>
2323
<source_model>Magento\LoginAsCustomerUi\Model\Config\Source\StoreViewLogin</source_model>
2424
<comment><![CDATA[

app/code/Magento/LoginAsCustomerUi/view/frontend/templates/html/notices.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
$viewFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerUi::images/magento-icon.svg');
1212
?>
13-
<?php if ($block->getConfig()->isEnabled()) : ?>
13+
<?php if ($block->getConfig()->isEnabled()): ?>
1414
<div data-bind="scope: 'loginAsCustomer'" >
1515
<div class="lac-notification clearfix" data-bind="visible: isVisible" style="display: none">
1616
<div class="top-container">

app/code/Magento/LoginAsCustomerUi/view/frontend/web/css/source/_module.less

Lines changed: 56 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,75 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
//
7+
// Variables
8+
// ---------------------------------------------
9+
10+
@lac-notification-background-color: #373330;
11+
@lac-notification-color: #fff;
12+
@lac-notification-links-color: #fff;
13+
14+
//
15+
// Common
16+
// ---------------------------------------------
17+
618
& when (@media-common = true) {
7-
.lac-notification {
8-
background-color: #373330;
9-
color: #fff;
10-
font-size: 16px;
19+
.lac-notification {
20+
background-color: @lac-notification-background-color;
21+
color: @lac-notification-color;
22+
font-size: 16px;
1123

12-
.lac-notification-icon {
13-
float: left;
14-
margin: 10px 25px 10px 10px;
24+
.lac-notification-icon {
25+
float: left;
26+
margin: 10px 25px 10px 10px;
1527

16-
.logo-img {
17-
display: block
18-
}
19-
}
28+
.logo-img {
29+
display: block
30+
}
31+
}
2032

21-
.lac-notification-text {
22-
float: left;
23-
padding: 15px 0;
24-
}
33+
.lac-notification-text {
34+
float: left;
35+
padding: 15px 0;
36+
}
2537

26-
.lac-notification-links {
27-
float: right;
28-
padding: 15px 0;
38+
.lac-notification-links {
39+
float: right;
40+
padding: 15px 0;
2941

30-
a {
31-
color: #fff;
32-
font-size: 14px;
33-
}
42+
a {
43+
color: @lac-notification-links-color;
44+
font-size: 14px;
45+
}
3446

35-
.lac-notification-close-link {
36-
&:after {
37-
content: ' ';
38-
background: url('../Magento_LoginAsCustomerUi/images/close.svg');
39-
display: inline-block;
40-
height: 12px;
41-
margin-left: 5px;
42-
vertical-align: middle;
43-
width: 12px;
47+
.lac-notification-close-link {
48+
&:after {
49+
background: url('../Magento_LoginAsCustomerUi/images/close.svg');
50+
content: ' ';
51+
display: inline-block;
52+
height: 12px;
53+
margin-left: 5px;
54+
vertical-align: middle;
55+
width: 12px;
56+
}
57+
}
4458
}
45-
}
4659
}
47-
}
4860
}
4961

5062
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
51-
.lac-notification {
52-
padding: 5px 0;
63+
.lac-notification {
64+
padding: 5px 0;
5365

54-
.lac-notification-icon {
55-
display: none;
56-
}
66+
.lac-notification-icon {
67+
display: none;
68+
}
5769

58-
.lac-notification-text,
59-
.lac-notification-links {
60-
float: none;
61-
padding: 5px 0;
62-
text-align: center;
70+
.lac-notification-text,
71+
.lac-notification-links {
72+
float: none;
73+
padding: 5px 0;
74+
text-align: center;
75+
}
6376
}
64-
}
6577
}

0 commit comments

Comments
 (0)