A WordPress Plugin That Helps Remove Access To The WordPress Dashboard From Non Administrators

Have you ever wanted to remove access to the WordPress dashboard for a user but didn’t want to touch any code to do it? Remove Dashboard Access by Drew Jaynes makes it an easy process. After activating the plugin, I found it difficult to locate where the configuration settings are. The settings are at the bottom of the Settings > Reading page. I also discovered a quick link to the settings on the plugins management screen.

You can remove access based on a user’s capability, or if they’re part of the Administrator, Author, or Editor roles. This is great if you don’t have any users assigned to roles provided by plugins like Edit Flow or if you created custom roles though the Members plugin. If a custom role has a specific capability separate from other roles, you can use the Limit By Capability feature.

Settings To Control Who Has Access To The Dashboard
Settings To Control Who Has Access To The Dashboard

For those that don’t have access, you can redirect them to a specific URL. You can also choose whether or not they can use the dashboard to edit their profile. Last but not least, there’s a box provided to create a custom login message. The plugin removes access to some of the built-in WordPress Toolbar menu items by default. However, if you want to remove toolbar menus from other plugins, you can follow the guide on the plugin’s other notes page.

Remove Dashboard Access works great for its intended purpose but if you need more granular control over which roles you can remove access from, you’ll need to look elsewhere. The plugin can be found on the WordPress plugin directory or on Github. Jaynes openly invites pull requests.

Do you know of a plugin that has a similar feature set but supports custom roles?

3

3 responses to “A WordPress Plugin That Helps Remove Access To The WordPress Dashboard From Non Administrators”

  1. It’s best to handle this sort of thing by capability rather than role anyway. Even if you wanted to do a pretty interface for regular folks, you could add something like an rda_admin_access capability for the roles that are allowed. You’d just code that behind the scenes. It’d actually be pretty simple:

    The UI would be a list of all [editable] roles with checkboxes next to them. These checked roles would have access.

    On save/update settings, you grab all roles. For the selected roles, add the custom capability. For unselected roles, check if they have the capability and remove it if they do.

    On plugin activation, auto-add the capability to roles like Administrator, Editor, Author, and Contributor or just the Administrator.

    Doing it this way would make it so much better because it’d be easy for people who do use plugins like Members to create custom roles and have it play nicely with this plugin. They can even manage access from within Members if they were already on the role-editing screen. I need to write more tutorials in this area. Now, I’ll stop thinking out loud and go build something.

  2. Hi Jeff, thanks for the mention.

    After activating the plugin, I found it difficult to locate where the configuration settings are. The settings are at the bottom of the Settings > Reading page.

    In v1.0, it had its own settings page, and sticking the options in > Reading for 1.1 was a bit of an experiment. When 4.0 rolls out, I’m probably gonna release 1.2 which should add Multisite support, and based on feedback I may re-introduce the standalone settings screen.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.