Skip to content

[Issue] Allow backend login without redirect #31042

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #30950: Allow backend login without redirect


Description (*)

Magento 2.4-develop
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)

Metadata

Metadata

Assignees

Labels

Component: BackendIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions