-
AuthorPosts
-
January 26, 2022 at 2:53 pm #1337305
Hi,
we’ve a website running with active maintenance mode.
Our customer want to have a user that only can read, what technicaly the subscriber role is doing.
Unfortunately the maintenance mode also effects the reading rule for subscribers.
We’re wondering if it’s possible to upgrade the subscriber role or creat a new user role that is able to read all pages even if maintenance is active but cant access wd-admin.
Is this possible? So far we’ve checked the user role attributes with the user role editor and activated “read”, “read_private_pages” and “read_private_posts” attributes. Sadly that had no effect on the maintenance mode and the visibility of the pages.
Can you provide a solution for this?Thanks in advance
Sebastian- This topic was modified 2 years, 9 months ago by emilconsor.
January 27, 2022 at 5:32 am #1337399Hey emilconsor,
Thank you for the inquiry.
The capabilities of the user role can be adjusted manually but there is a plugin that should allow you to do this without touching any code. Please check the following plugin.
// https://wordpress.org/plugins/user-role-editor/
Best regards,
IsmaelJanuary 27, 2022 at 8:57 am #1337427Hi Ismael,
thanks.We already use this plugin. Can you tell us which capabilities we should adjust to achieve what we need?
Best regards
SebastianJanuary 27, 2022 at 10:37 am #1337468Hi,
Thank you for the update.
Which maintenance mode plugin are you using? The maintenance mode probably allows user roles with higher capabilities, probably that of an admin which full access to the dashboard, so what you are trying here might not be possible without directly editing the maintenance plugin’s conditions. Unfortunately, that is beyond the scope of support. Please contact the plugin authors for additional info.
Best regards,
IsmaelJanuary 27, 2022 at 10:39 am #1337469Hi,
If you are using the default maintenace mode option in the theme, the user should have the “edit_published_posts” capability, so that might be a problem. You will find this condition in the themes/enfold/includes/class-avia-custom-pages.php file around line 305 inside the handler_maintenance_mode function.
if( is_user_logged_in() && current_user_can( 'edit_published_posts' ) ) { return $template; }
Best regards,
IsmaelJanuary 27, 2022 at 10:49 am #1337476Hi Ismael,
nice, thats it!
Thanks!Regards,
SebastianJanuary 28, 2022 at 4:11 pm #1337761 -
AuthorPosts
- The topic ‘Disable Maintenance Mode for subscriber or new user role’ is closed to new replies.