django-maintenance-mode
django-maintenance-mode copied to clipboard
Logout all users except superusers
I have set:
MAINTENANCE_MODE_IGNORE_SUPERUSER = True
MAINTENANCE_MODE_LOGOUT_AUTHENTICATED_USER = True
When activating the maintenance mode also the superuser gets logged out and has no change to sign-in again. With this combination I wish the superuser can stay in and all authenticated users get logged off?
I would even do the check later and provide the user with the login screen. If not a superuser login will fail with 503, but a superuser can login.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
@williwacker these two settings operates in different contexts: MAINTENANCE_MODE_IGNORE_SUPERUSER
tells if super user is subject to maintenance mode response or not, MAINTENANCE_MODE_LOGOUT_AUTHENTICATED_USER
affects all users.
For achieving what you need some new options should be added:
-
MAINTENANCE_MODE_LOGOUT_STAFF_USER
-
MAINTENANCE_MODE_LOGOUT_SUPERUSER
Sounds good.