Skip to content

[Backport] Admin user auth controller refactor #17156

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

Closed

Conversation

gelanivishal
Copy link
Contributor

@gelanivishal gelanivishal commented Jul 26, 2018

Original Pull Request

#16560

Description

Refactor the code by removing the direct use of ObjectManager and includes the dependencies using Constructor Dependency Injection

Manual testing scenarios

  1. Created a new admin user
  2. Login and logout using new admin user
  3. Clicked on forgot password and provided new admin user email id.
  4. Clicked on reset password link in email.
  5. Created new password from reset password page.
  6. Login using new password.

* @param Context $context
* @param UserFactory $userFactory
* @param SecurityManager $securityManager
* @param CollectionFactory $userCollectionFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, add missing parameter to doc block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor Author

@gelanivishal gelanivishal left a comment

Choose a reason for hiding this comment

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

@sidolov I have added missing parameter, Please review it.

* @param Context $context
* @param UserFactory $userFactory
* @param SecurityManager $securityManager
* @param CollectionFactory $userCollectionFactory
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-2557 has been created to process this Pull Request

@sidolov
Copy link
Contributor

sidolov commented Jul 27, 2018

Hi @gelanivishal , one of static tests failing with provided changes:

Magento\Test\Integrity\Di\CompilerTest::testConstructorIntegrity
Passed: 7792, Failed: 2, Incomplete: 0, Skipped: 0.
Data set: array (
  0 => '\\Magento\\User\\Controller\\Adminhtml\\Auth\\Forgotpassword',
)
Incorrect dependency in class \Magento\User\Controller\Adminhtml\Auth\Forgotpassword in /var/www/html/app/code/Magento/User/Controller/Adminhtml/Auth/Forgotpassword.php
\Magento\Backend\Helper\Data already exists in context object

Data set: array (
  0 => '\\Magento\\User\\Controller\\Adminhtml\\Auth\\ResetPasswordPost',
)
Incorrect dependency in class \Magento\User\Controller\Adminhtml\Auth\ResetPasswordPost in /var/www/html/app/code/Magento/User/Controller/Adminhtml/Auth/ResetPasswordPost.php
\Magento\Backend\Helper\Data already exists in context object

Please, take a look and fix your solution according to test rules.
Thank you!

@sidolov
Copy link
Contributor

sidolov commented Aug 10, 2018

Hi @gelanivishal , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants