File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed
app/code/Magento/LoginAsCustomerAssistance Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 99
1010use Magento \Framework \App \Config \ScopeConfigInterface ;
1111use Magento \LoginAsCustomerAssistance \Api \ConfigInterface ;
12+ use Magento \Store \Model \ScopeInterface ;
1213
1314/**
1415 * @inheritdoc
@@ -42,14 +43,20 @@ public function __construct(
4243 */
4344 public function getShoppingAssistanceCheckboxTitle (): string
4445 {
45- return (string )$ this ->scopeConfig ->getValue (self ::XML_PATH_SHOPPING_ASSISTANCE_CHECKBOX_TITLE );
46+ return (string )$ this ->scopeConfig ->getValue (
47+ self ::XML_PATH_SHOPPING_ASSISTANCE_CHECKBOX_TITLE ,
48+ ScopeInterface::SCOPE_WEBSITE
49+ );
4650 }
4751
4852 /**
4953 * @inheritdoc
5054 */
5155 public function getShoppingAssistanceCheckboxTooltip (): string
5256 {
53- return (string )$ this ->scopeConfig ->getValue (self ::XML_PATH_SHOPPING_ASSISTANCE_CHECKBOX_TOOLTIP );
57+ return (string )$ this ->scopeConfig ->getValue (
58+ self ::XML_PATH_SHOPPING_ASSISTANCE_CHECKBOX_TOOLTIP ,
59+ ScopeInterface::SCOPE_WEBSITE
60+ );
5461 }
5562}
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ public function beforeExtractData(
5757 $ scope = null ,
5858 $ scopeOnly = true
5959 ): void {
60- if (! $ this ->authorization -> isAllowed ( ' Magento_LoginAsCustomer::opt_in_preference ' )
61- && $ this ->isSetAssistanceAllowedParam ( $ request )
60+ if ($ this ->isSetAssistanceAllowedParam ( $ request )
61+ && ! $ this ->authorization -> isAllowed ( ' Magento_LoginAsCustomer::allow_shopping_assistance ' )
6262 ) {
6363 $ customerId = $ request ->getParam ('customer_id ' );
6464 $ assistanceAllowedParam =
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public function afterGetMeta(
8989 ): array {
9090 if (!$ this ->config ->isEnabled ()) {
9191 $ assistanceAllowedConfig = ['visible ' => false ];
92- } elseif (!$ this ->authorization ->isAllowed ('Magento_LoginAsCustomer::opt_in_preference ' )) {
92+ } elseif (!$ this ->authorization ->isAllowed ('Magento_LoginAsCustomer::allow_shopping_assistance ' )) {
9393 $ assistanceAllowedConfig = [
9494 'disabled ' => true ,
9595 'notice ' => __ ('You have no permission to change Opt-In preference. ' ),
Original file line number Diff line number Diff line change 66 "magento/framework" : " *" ,
77 "magento/module-backend" : " *" ,
88 "magento/module-customer" : " *" ,
9+ "magento/module-store" : " *" ,
10+ "magento/module-login-as-customer" : " *" ,
911 "magento/module-login-as-customer-api" : " *"
1012 },
1113 "suggest" : {
12- "magento/module-login-as-customer-admin-ui" : " *" ,
13- "magento/module-login-as-customer" : " *"
14+ "magento/module-login-as-customer-admin-ui" : " *"
1415 },
1516 "type" : " magento2-module" ,
1617 "license" : [
Original file line number Diff line number Diff line change 1111 <resource id =" Magento_Backend::admin" >
1212 <resource id =" Magento_Customer::customer" >
1313 <resource id =" Magento_LoginAsCustomer::login" >
14- <resource id =" Magento_LoginAsCustomer::opt_in_preference " title =" Change Customer Opt-In Preference " sortOrder =" 20" />
14+ <resource id =" Magento_LoginAsCustomer::allow_shopping_assistance " title =" Allow remote shopping assistance " sortOrder =" 20" />
1515 </resource >
1616 </resource >
1717 </resource >
You can’t perform that action at this time.
0 commit comments