Skip to content

Commit

Permalink
Fixes #118
Browse files Browse the repository at this point in the history
Additional path `/customer/account/resetpasswordpost`
  • Loading branch information
Artem-Schander committed Jun 10, 2018
1 parent 16c7b82 commit a2299a0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,5 @@
/dist
/.docker
/build
/var
/tags
/var
23 changes: 23 additions & 0 deletions Setup/UpgradeData.php
Expand Up @@ -72,6 +72,10 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
$this->runUpgrade221($setup);
}

if (version_compare($context->getVersion(), '3.0.2', '<')) {
$this->runUpgrade302($setup);
}

$setup->endSetup();
}

Expand Down Expand Up @@ -210,4 +214,23 @@ private function runUpgrade221(ModuleDataSetupInterface $setup)
]
);
}

/**
* @param ModuleDataSetupInterface $setup
*/
private function runUpgrade302(ModuleDataSetupInterface $setup)
{
$whitelistEntries = [
$this->getWhitelistEntryAsArray(
0,
'Customer Account Reset Password Post',
'/customer/account/resetpasswordpost'
),
];

$setup->getConnection()->insertMultiple(
$setup->getTable('bitexpert_forcelogin_whitelist'),
$whitelistEntries
);
}
}
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "bitexpert/magento2-force-customer-login",
"description": "The Force Login module for Magento2 redirects a storefront visitor to the Magento2 Frontend login page, if the visitor is not logged in. It is possible to configure the whitelisted urls to add custom definitions.",
"type": "magento2-module",
"version": "3.0.0",
"version": "3.0.2",
"minimum-stability": "stable",
"license": "Apache-2.0",
"authors": [
Expand Down Expand Up @@ -46,7 +46,7 @@
"@test"
],
"cs-check": "vendor/bin/phing sniff",
"cs-fix": "vendor/bin/ping cs-fix",
"cs-fix": "vendor/bin/phing cs-fix",
"test": "vendor/bin/phing unit"
}
}
1 change: 1 addition & 0 deletions etc/di.xml
Expand Up @@ -25,6 +25,7 @@
<item name="/customer/account/logoutSuccess" xsi:type="string">Customer Account Logout Success</item>
<item name="/customer/account/create" xsi:type="string">Customer Account Create</item>
<item name="/customer/account/createPassword" xsi:type="string">Customer Account Create Password</item>
<item name="/customer/account/resetpasswordpost" xsi:type="string">Customer Account Reset Password Post</item>
<item name="/customer/account/forgotpassword" xsi:type="string">Customer Account Forgot Password</item>
<item name="/customer/account/forgotpasswordpost" xsi:type="string">Customer Account Forgot Password Post</item>
<item name="/customer/section/load" xsi:type="string">Customer Section Load</item>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Expand Up @@ -11,7 +11,7 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="BitExpert_ForceCustomerLogin" setup_version="3.0.0">
<module name="BitExpert_ForceCustomerLogin" setup_version="3.0.2">
<sequence>
<module name="Magento_Customer"/>
</sequence>
Expand Down

0 comments on commit a2299a0

Please sign in to comment.