Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Admin][UI] Sending administrator's password reset email #14138

Merged
merged 16 commits into from Jul 18, 2022
Merged

[Admin][UI] Sending administrator's password reset email #14138

merged 16 commits into from Jul 18, 2022

Conversation

jakubtobiasz
Copy link
Member

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets
License MIT

Continuation of #14128.

What I've managed to done:

  • Add Forgot password? button on Admin Panel login page
  • CleanShot 2022-07-07 at 9 23 57@2x
  • Add request admin's password reset page
  • CleanShot 2022-07-07 at 9 24 08@2x
  • Add tests checking if the correct version of email is send for both API and UI part

And.. flash message 💃🏻.
CleanShot 2022-07-07 at 9 25 20@2x

@jakubtobiasz jakubtobiasz requested a review from a team as a code owner July 7, 2022 19:26
@probot-autolabeler probot-autolabeler bot added the Admin AdminBundle related issues and PRs. label Jul 7, 2022
@jakubtobiasz
Copy link
Member Author

@Zales0123
All comments resolved. I've added an option to define redirect route from yml. I've decided to put "the default" value in a code anyway just to be sure we'll never spot null there. Also I've removed spec for Render action but after implementing the define redirect route option I've decided to left the second action. If you still feel we should remove it just let me know 🖖🏼.

@AdamKasp
Most of your comments are resolved, just 2 need your interaction :D.

@Zales0123 Zales0123 added the Feature New feature proposals. label Jul 11, 2022
@jakubtobiasz
Copy link
Member Author

@GSadee @NoResponseMate thanks for the suggestions, all introduced 👊🏻.

Copy link
Member

@GSadee GSadee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I see correctly, you've added validation for both API and UI to this PR, IMO it would be better to add another PR with validation as you've planned before

src/Sylius/Behat/Context/Api/EmailContext.php Outdated Show resolved Hide resolved
@probot-autolabeler probot-autolabeler bot added the Maintenance CI configurations, READMEs, releases, etc. label Jul 14, 2022
@jakubtobiasz
Copy link
Member Author

@GSadee, after a conversation with @NoResponseMate I've dropped his three commits and I've resolved all your comments. While adding information about changes in security.yaml I noticed we didn't mention a similar change in the case of API. I've included it in the same PR as all API-related PR are already merged ✌🏻.

UPGRADE-1.12.md Outdated Show resolved Hide resolved
UPGRADE-API-1.12.md Outdated Show resolved Hide resolved
@GSadee GSadee merged commit 8d1d6d9 into Sylius:1.12 Jul 18, 2022
@GSadee
Copy link
Member

GSadee commented Jul 18, 2022

Thank you, Jakub! 🥇

GSadee added a commit that referenced this pull request Jul 19, 2022
…ing a password reset (NoResponseMate)

This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12          |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | -                      |
| License         | MIT                                                          |

Based on the work done in #14138 

The way a request to reset the password is treated should seemingly be the same regardless if the user exists or not.

Commits
-------

720b267 Allow requesting password reset token with a non existent admin email
50140d7 Allow requesting password reset token with a non existent customer email
GSadee added a commit to Sylius/SyliusDemo that referenced this pull request Jul 20, 2022
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fixes needed after Sylius/Sylius#14138

1. Allow to access `/admin/forgotten-password` URL anonymously 
2. Rework admin login template to use events rather overriding 

Before: 

<img width="587" alt="Zrzut ekranu 2022-07-19 o 14 48 02" src="https://user-images.githubusercontent.com/6212718/179754838-3a9c9d36-ad24-404e-b203-8ebce735364c.png">

After: 

<img width="527" alt="Zrzut ekranu 2022-07-19 o 14 48 16" src="https://user-images.githubusercontent.com/6212718/179754873-9b335198-1769-4e37-abf0-a562b49c3af3.png">


Commits
-------

d5ec3d8 Add forgotten password url to anonymous URLs
52248d7 Rework admin login form to events to show "Forgotten password" button
GSadee added a commit that referenced this pull request Jul 21, 2022
…ResponseMate)

This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12          |
| Bug fix?        | no                                                       |
| New feature?    | yes                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | -                      |
| License         | MIT                                                          |

Based on the work done in #14138 

Added validation for the admin's request password reset feature.

Commits
-------

71cb466 Validation of requesting an admin's password reset token
b918b24 [Behat] Extract ResettingPasswordContext out of LoginContext
1d71656 [Behat] Fix methods order in Ui/ResettingPasswordContext
runesatsna added a commit to runesatsna/SyliusDemo that referenced this pull request Nov 26, 2023
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fixes needed after Sylius/Sylius#14138

1. Allow to access `/admin/forgotten-password` URL anonymously 
2. Rework admin login template to use events rather overriding 

Before: 

<img width="587" alt="Zrzut ekranu 2022-07-19 o 14 48 02" src="https://user-images.githubusercontent.com/6212718/179754838-3a9c9d36-ad24-404e-b203-8ebce735364c.png">

After: 

<img width="527" alt="Zrzut ekranu 2022-07-19 o 14 48 16" src="https://user-images.githubusercontent.com/6212718/179754873-9b335198-1769-4e37-abf0-a562b49c3af3.png">


Commits
-------

d5ec3d88bcecbc2315a0a80ea4c3172ea891aaeb Add forgotten password url to anonymous URLs
52248d7dd7adac1993e59145db891fbb761cde94 Rework admin login form to events to show "Forgotten password" button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs. Feature New feature proposals. Maintenance CI configurations, READMEs, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants