- ๐ซ๐ทFrance prudloff Lille
#14 creates an infinite redirect loop because
$this->account->isAuthenticated()
is always true now so it always sends aRedirectResponse
.
I thinkMaintenanceModeSubscriber
serves no other purpose and could be entirely removed. - last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago Patch Failed to Apply - Merge request !8609Issue #3057267: User logout during maintenance mode โ (Open) created by prudloff
- ๐ฎ๐ณIndia samit.310@gmail.com
samit.310@gmail.com โ made their first commit to this issueโs fork.
- Merge request !8876057267: User logout during maintenance mode โ (Open) created by samit.310@gmail.com
- Status changed to Needs review
9 months ago 1:45pm 22 July 2024 - ๐ฎ๐ณIndia samit.310@gmail.com
HI,
We have permission provided by Drupal Use the site in maintenance mode(
access site in maintenance mode
) that allow any user to work on maintenance mode, A simple change can fix this user logout issue,Here all the users who have Use the site in maintenance mode(
access site in maintenance mode
) permission, will not logout if the site goes to maintenance mode.Here is the PR link: https://git.drupalcode.org/project/drupal/-/merge_requests/8876/diffs
Thanks
Samit K. - ๐จ๐ญSwitzerland handkerchief
@samit.310@gmail.com But not logging out does not automatically mean that users should continue to use the website despite maintenance.
Example from practice:
Website is briefly switched to maintenance mode several times a day because automatic backups are performed. However, it is correct that during backups, no user administers the website and therefore should not have the permission โUse the site in maintenance modeโ. But the users should not all be logged out just because maintenance mode was switched on briefly. If you have a website with a community where many users are logged in, then they are automatically logged out several times a day. - Status changed to Needs work
9 months ago 2:58pm 23 July 2024 - ๐บ๐ธUnited States smustgrave
Only briefly skimmed but any change will need test coverage.
Also issue summary appears incomplete, recommend using default issue template. Sounds like from previous comment MR solution isn't along the idea so definitely needs a summary update.
- ๐ฎ๐ณIndia samit.310@gmail.com
Hi @handkerchief,
Agree with your point, but here the idea is the only trusted or some specific user roles have this permission Use the site in maintenance mode(
access site in maintenance mode
).The functionality will remain the same for other users, meaning whenever the maintenance mode will on all the users except those with the above permission will logout.
Thanks
Samit K. - ๐ซ๐ทFrance prudloff Lille
prudloff โ changed the visibility of the branch 057267-user-logout-during-fix to hidden.
- ๐บ๐ธUnited States smustgrave
So believe this would be a feature request vs an actual bug
Not sure if this needs framework or product manager approval first but feedback appears to be addressed.
- ๐ฌ๐งUnited Kingdom catch
Did some git archaeology, this was added in #50901: User login under maintenance mode โ .
One of the reasons given then was that if you are logged in as a regular auth user, you would not be able to logout to then login again as an admin account. Do we still prevent people from logging out when maintenance mode is on? If so maybe we need to exclude that route.
Also one small comment on the updated test coverage.
- ๐ซ๐ทFrance prudloff Lille
I could indeed reproduce this with the patch: logged-in users can't logout (/user/logout returns the maintenance page).
(A workaround is to open a new private browsing window but I see how this is a usability problem.)I added _maintenance_access to the logout route in order to fix this.