Skip to content

Commit 201b67b

Browse files
committed
magento/magento2-login-as-customer#144: "Login as Customer" functionality should be enabled by default.
1 parent 295ff43 commit 201b67b

File tree

10 files changed

+13
-12
lines changed

10 files changed

+13
-12
lines changed

app/code/Magento/LoginAsCustomer/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"require": {
55
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
7+
"magento/module-backend": "*",
78
"magento/module-customer": "*",
89
"magento/module-login-as-customer-api": "*"
910
},

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public function __construct(
131131
$this->saveAuthenticationData = $saveAuthenticationData;
132132
$this->deleteAuthenticationDataForUser = $deleteAuthenticationDataForUser;
133133
$this->url = $url;
134-
$this->setLoggedAsCustomerCustomerId = $setLoggedAsCustomerCustomerId ?? ObjectManager::getInstance()->get(SetLoggedAsCustomerCustomerIdInterface::class);
134+
$this->setLoggedAsCustomerCustomerId = $setLoggedAsCustomerCustomerId
135+
?? ObjectManager::getInstance()->get(SetLoggedAsCustomerCustomerIdInterface::class);
135136
$this->isLoginAsCustomerEnabled = $isLoginAsCustomerEnabled
136137
?? ObjectManager::getInstance()->get(IsLoginAsCustomerEnabledForCustomerInterface::class);
137138
}

app/code/Magento/LoginAsCustomerAdminUi/Ui/Customer/Component/Button/DataProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* Get data for Login as Customer button.
1515
*
1616
* Use this class as a base for virtual types declaration.
17-
*
18-
* @api
1917
*/
2018
class DataProvider
2119
{

app/code/Magento/LoginAsCustomerApi/Api/Data/IsLoginAsCustomerEnabledForCustomerResultInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
/**
1111
* IsLoginAsCustomerEnabledForCustomerInterface results.
12-
*
13-
* @api
1412
*/
1513
interface IsLoginAsCustomerEnabledForCustomerResultInterface
1614
{

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
/**
1313
* Check if Login as Customer functionality is enabled for Customer.
14-
*
15-
* @api
1614
*/
1715
interface IsLoginAsCustomerEnabledForCustomerInterface
1816
{

app/code/Magento/LoginAsCustomerFrontendUi/CustomerData/LoginAsCustomerUi.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public function __construct(
4848
) {
4949
$this->customerSession = $customerSession;
5050
$this->storeManager = $storeManager;
51-
$this->getLoggedAsCustomerAdminId = $getLoggedAsCustomerAdminId ?? ObjectManager::getInstance()->get(GetLoggedAsCustomerAdminIdInterface::class);
51+
$this->getLoggedAsCustomerAdminId = $getLoggedAsCustomerAdminId
52+
?? ObjectManager::getInstance()->get(GetLoggedAsCustomerAdminIdInterface::class);
5253
}
5354

5455
/**

app/code/Magento/LoginAsCustomerFrontendUi/Model/AuthenticateCustomerBySecret.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public function __construct(
4848
) {
4949
$this->getAuthenticationDataBySecret = $getAuthenticationDataBySecret;
5050
$this->customerSession = $customerSession;
51-
$this->setLoggedAsCustomerAdminId = $setLoggedAsCustomerAdminId ?? ObjectManager::getInstance()->get(SetLoggedAsCustomerAdminIdInterface::class);
51+
$this->setLoggedAsCustomerAdminId = $setLoggedAsCustomerAdminId
52+
?? ObjectManager::getInstance()->get(SetLoggedAsCustomerAdminIdInterface::class);
5253
}
5354

5455
/**

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public function __construct(
4545
) {
4646
$this->config = $config;
4747
$this->httpContext = $httpContext;
48-
$this->getLoggedAsCustomerAdminId = $getLoggedAsCustomerAdminId ?? ObjectManager::getInstance()->get(GetLoggedAsCustomerAdminIdInterface::class);
48+
$this->getLoggedAsCustomerAdminId = $getLoggedAsCustomerAdminId
49+
?? ObjectManager::getInstance()->get(GetLoggedAsCustomerAdminIdInterface::class);
4950
}
5051

5152
/**

app/code/Magento/LoginAsCustomerPageCache/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-customer": "*",
8-
"magento/module-store": "*"
8+
"magento/module-store": "*",
9+
"magento/module-login-as-customer-api": "*"
910
},
1011
"suggest": {
1112
"magento/module-page-cache": "*"

app/code/Magento/LoginAsCustomerSales/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"magento/framework": "*",
77
"magento/module-backend": "*",
88
"magento/module-customer": "*",
9-
"magento/module-user": "*"
9+
"magento/module-user": "*",
10+
"magento/module-login-as-customer-api": "*"
1011
},
1112
"suggest": {
1213
"magento/module-sales": "*"

0 commit comments

Comments
 (0)