-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Currently, we have the vip_maintenance_mode_required_cap filter that check's for a required capability (edit_posts by default) and if the user does NOT have that capability, it will redirect them to the Maintenance Mode page.
However, this is hooked into template_redirect so it only happens on the frontend of the site. If they log in they will still be redirected to the Dashboard. If they try to view the site, they will see the Maintenance Mode page.
I think it makes sense to redirect everywhere and not just on the frontend.
Possible use case:
I am a site Admin and I want to enable maintenance mode and restrict specific users from logging in. I add a filter to restrict all non-admins from being able to log in, and I do some maintenance tasks while confidently knowing no one else is logging in to update/change data.
Thoughts?
cc @anigeluk