Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291302

Redirect anonymous users to login page from an exception listener instead of in MaintenanceModeSubscriber and restrict access to the my-account link to authenticated users

$
0
0

Problem/Motivation

#2288911: Use route name instead of system path in user maintenance mode subscriber introduces an exception subscriber (AccessDeniedSubscriber) to redirect authenticated users from user/login and user/register to the users profile page and profile form respectively. Let's also remove the redirection of anonymous users from user to user/login from the maintenance mode subscriber to the UserController::userPage. In order to do this it is necessary to change quite a bit of test code which assumes a login form on the user page instead of at user/login.

Proposed resolution

Move the redirection of anonymous users from user to user/login into an exception listener and restrict access to user to authenticated users. Also fix tests where necessary.

Note that before anonymous users only are redirected from user to user/login when maintenance mode was active. With this patch this will happen even when maintenance mode is not active. This will also resolve an obscure theming issue which is exclusive to the login page #2346671: Two templates necessary in order to customize the login page.

Remaining tasks

User interface changes

API changes


Viewing all articles
Browse latest Browse all 291302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>