Problem/Motivation
A non-ldap user in an environment using mixed mode wants to reset his password using the Reset your password link on the user edit form.
Debug Report
- Create a new user using
drush user:create testuser --password=******** - Login with the new user
- Enter the user edit form → you will see the Reset your password link nearby the password field
- Click on the link → Access forbidden
BTW: at the moment every authenticated user gets an Access denied, it is independent of the user's role.
Proposed resolution
Non-ldap user will be able to use the reset form.
Remaining tasks
Update \Drupal\ldap_authentication\Routing\RouteSubscriber::validateResetPasswordAllowed to allow access for a logged-in users who is not an ldap_user.
Data model changes
No
Issue fork ldap-3549930
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rwam commentedI've created a solution which works fine on our end. So would be great to get any feedback if it's suitable.
Comment #6
bluegeek9 commented