Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required capability: Redirect to maintenance mode page on login #30

Open
mikeyarce opened this issue Mar 22, 2018 · 0 comments
Open

Required capability: Redirect to maintenance mode page on login #30

mikeyarce opened this issue Mar 22, 2018 · 0 comments

Comments

@mikeyarce
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants