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

Allow backend login without redirect #30950

Conversation

aapokiiso
Copy link
Contributor

@aapokiiso aapokiiso commented Nov 17, 2020

Description (*)

Currently, when accessing a backend page via a direct URL as a logged out admin, the admin is redirected to <backend-url>/admin to log in. After logging in, they are redirected to the admin dashboard (or whatever page is selected as the startup page in system configuration).

This can be frustrating, since the admin now has to manually navigate to the requested page. This also potentially prevents some scripted tasks.

This PR proposes to remove the redirect to <backend-url>/admin, in which case the log in happens on the same page as the requested page (same as M1). The user is directly redirected to the requested page after login.

Related Pull Requests

  • MAGETWO-45465 The proposed code to be removed was added in this commit.

Manual testing scenarios (*)

  1. Add an admin user with a role that allows them to view products (Magento_Catalog::products ACL resource).
  2. Make sure you're logged out from the backend.
  3. Attempt to access <backend-url>/catalog/product/
  4. The login form should be presented to you. Check the URL - you should still be on <backend-url>/catalog/product/ with this PR.
  5. Log in.
  6. You should see the product listing directly (and not be redirected to the startup page).

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Allow backend login without redirect #31042: Allow backend login without redirect

@m2-assistant
Copy link

m2-assistant bot commented Nov 17, 2020

Hi @aapokiiso. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@aapokiiso
Copy link
Contributor Author

@magento run all tests

@gabrieldagama gabrieldagama added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Nov 24, 2020
@gabrieldagama
Copy link
Contributor

@magento create issue

@gabrieldagama
Copy link
Contributor

@magento run all tests

@aleron75 aleron75 self-assigned this Nov 30, 2020
@m2-community-project m2-community-project bot moved this from Pending Review to Review in Progress in High Priority Pull Requests Dashboard Nov 30, 2020
@aleron75
Copy link
Contributor

Hello @aapokiiso, thanks for your contribution.

I was looking at the failing tests and I think the only two that fails related to this PR are the following functional tests :

Would you mind updating the above functional test (it's the same kind of test failing on both CE and EE)?

The other failing tests seem flaky and not directly related to this PR, let the QA team verify that.

Thank you again.

@aapokiiso
Copy link
Contributor Author

aapokiiso commented Dec 9, 2020

@magento run Functional Tests CE, Functional Tests EE, Functional Tests B2B

@aapokiiso
Copy link
Contributor Author

@magento run all tests

@aapokiiso
Copy link
Contributor Author

@aleron75 The related functional test has now been fixed

@m2-community-project m2-community-project bot moved this from Review in Progress to Ready for Testing in High Priority Pull Requests Dashboard Dec 15, 2020
@aleron75 aleron75 added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Progress: ready for testing labels Dec 15, 2020
@m2-community-project m2-community-project bot moved this from Ready for Testing to On Hold in High Priority Pull Requests Dashboard Dec 15, 2020
@magento-engcom-team
Copy link
Contributor

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

@engcom-Delta
Copy link
Contributor

✔️ QA passed
Result:
Before:
❌ The admin is redirected to /admin
Peek 2020-12-28 09-22

After:
✔️ Admin see the product listing directly
Peek 2020-12-28 08-50

@m2-community-project m2-community-project bot moved this from Testing in Progress to Ready for Testing in High Priority Pull Requests Dashboard Dec 28, 2020
@engcom-Delta engcom-Delta added the QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope label Dec 28, 2020
@engcom-Delta engcom-Delta moved this from Ready for Testing to Testing in Progress in High Priority Pull Requests Dashboard Dec 28, 2020
@engcom-Delta
Copy link
Contributor

Note: Automation tests are passed

@engcom-Delta engcom-Delta moved this from Testing in Progress to Merge in Progress in High Priority Pull Requests Dashboard Dec 28, 2020
@magento-engcom-team magento-engcom-team merged commit 03ddfb9 into magento:2.4-develop Jan 24, 2021
@m2-assistant
Copy link

m2-assistant bot commented Jan 24, 2021

Hi @aapokiiso, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ihor-sviziev
Copy link
Contributor

@aapokiiso @aleron75 I feel that test coverage is still missing here, while you just fixed failing MFTF tests.

@gabrieldagama gabrieldagama moved this from Merge in Progress to Recently Merged in High Priority Pull Requests Dashboard Jan 25, 2021
@aapokiiso aapokiiso deleted the backend-allow-login-without-redirect branch December 17, 2021 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Backend Component: Security Component: User Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Allow backend login without redirect
7 participants