Skip to content

Commit

Permalink
allow admin to send an email for resetting password
Browse files Browse the repository at this point in the history
  • Loading branch information
malyMiso committed Aug 9, 2024
1 parent bf9c821 commit 0166b59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ security:
- { path: ^/%admin_url%/billing-address/edit, roles: ROLE_CUSTOMER_FULL }
- { path: ^/%admin_url%/customer/edit-personal-data/, roles: ROLE_CUSTOMER_FULL }
- { path: ^/%admin_url%/customer/new-customer-user/, roles: ROLE_CUSTOMER_FULL }
- { path: ^/%admin_url%/customer/admin_customer_send_reset_password/, roles: ROLE_CUSTOMER_VIEW }
- { path: ^/%admin_url%/delivery-address/edit, roles: ROLE_CUSTOMER_FULL }
- { path: ^/%admin_url%/delivery-address/new, roles: ROLE_CUSTOMER_FULL }
- { path: ^/%admin_url%/customer/, roles: ROLE_CUSTOMER_VIEW }
Expand Down
3 changes: 2 additions & 1 deletion app/src/Controller/Admin/CustomerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
* @property \App\Model\Customer\User\CustomerUserUpdateDataFactory $customerUserUpdateDataFactory
* @property \App\Model\Customer\User\CustomerUserFacade $customerUserFacade
* @method \App\Model\Administrator\Administrator getCurrentAdministrator()
* @method __construct(\App\Model\Customer\User\CustomerUserDataFactory $customerUserDataFactory, \Shopsys\FrameworkBundle\Model\Customer\User\CustomerUserListAdminFacade $customerUserListAdminFacade, \App\Model\Customer\User\CustomerUserFacade $customerUserFacade, \Shopsys\FrameworkBundle\Model\AdminNavigation\BreadcrumbOverrider $breadcrumbOverrider, \Shopsys\FrameworkBundle\Model\Administrator\AdministratorGridFacade $administratorGridFacade, \Shopsys\FrameworkBundle\Component\Grid\GridFactory $gridFactory, \Shopsys\FrameworkBundle\Component\Domain\AdminDomainTabsFacade $adminDomainTabsFacade, \App\Model\Order\OrderFacade $orderFacade, \App\Model\Customer\User\CustomerUserUpdateDataFactory $customerUserUpdateDataFactory, \Shopsys\FrameworkBundle\Component\Domain\Domain $domain, \Shopsys\FrontendApiBundle\Model\Security\LoginAdministratorAsUserUrlProvider $loginAdministratorAsUserUrlProvider, \Shopsys\FrameworkBundle\Model\Customer\CustomerFacade $customerFacade)
* @method __construct(\App\Model\Customer\User\CustomerUserDataFactory $customerUserDataFactory, \Shopsys\FrameworkBundle\Model\Customer\User\CustomerUserListAdminFacade $customerUserListAdminFacade, \App\Model\Customer\User\CustomerUserFacade $customerUserFacade, \Shopsys\FrameworkBundle\Model\AdminNavigation\BreadcrumbOverrider $breadcrumbOverrider, \Shopsys\FrameworkBundle\Model\Administrator\AdministratorGridFacade $administratorGridFacade, \Shopsys\FrameworkBundle\Component\Grid\GridFactory $gridFactory, \Shopsys\FrameworkBundle\Component\Domain\AdminDomainTabsFacade $adminDomainTabsFacade, \App\Model\Order\OrderFacade $orderFacade, \App\Model\Customer\User\CustomerUserUpdateDataFactory $customerUserUpdateDataFactory, \Shopsys\FrameworkBundle\Component\Domain\Domain $domain, \Shopsys\FrontendApiBundle\Model\Security\LoginAdministratorAsUserUrlProvider $loginAdministratorAsUserUrlProvider, \Shopsys\FrameworkBundle\Model\Customer\CustomerFacade $customerFacade, \App\Model\Customer\User\CustomerUserPasswordFacade $customerUserPasswordFacade)
* @property \Shopsys\FrontendApiBundle\Model\Security\LoginAdministratorAsUserUrlProvider $loginAdministratorAsUserUrlProvider
* @property \App\Model\Customer\User\CustomerUserPasswordFacade $customerUserPasswordFacade
*/
class CustomerController extends BaseCustomerController
{
Expand Down
2 changes: 1 addition & 1 deletion app/tests/App/Smoke/Http/RouteConfigCustomization.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private function configureGeneralRules(RouteConfigCustomizer $routeConfigCustomi
}
})
->customize(function (RouteConfig $config, RouteInfo $info) {
if (preg_match('~(_delete$)|(_delete_all$)|(^admin_mail_deletetemplate$)|(^admin_(stock|store)_setdefault$)~', $info->getRouteName())) {
if (preg_match('~(_delete$)|(_delete_all$)|(^admin_mail_deletetemplate$)|(^admin_(stock|store)_setdefault$)|(^admin_customer_send_reset_password$)~', $info->getRouteName())) {
$debugNote = 'Add CSRF token for any delete action during test execution. '
. '(Routes are protected by RouteCsrfProtector.)';
$config->changeDefaultRequestDataSet($debugNote)
Expand Down

0 comments on commit 0166b59

Please sign in to comment.