How can I allow non-admin users to have an UpdraftCentral dashboard?

(These instructions are valid for UpdraftCentral 0.5.2 and later).

If you want non-admin users to be able to have their own UpdraftCentral dashboard, so that they can add sites and control them, then there are two steps:

1. Add parameters to the short-code

When putting the updraft_central shortcode on a page, use the require_role parameter. This shold be a comma (not space) separated list of roles whom you wish to have access to an UpdraftCentral dashboard. Example:

Using parameters with the shortcode

2. Add a code fragment

The first step will allow users to see a dashboard. To also grant them permissions to use it, you will need to add a bit of code to your site, either as an mu-plugin, or to your child theme’s functions.php file. (You can Google these techniques if they are new to you).

add_filter('updraftcentral_user_can', '__return_true');

That fragment will grant non-admin users who are logged in the ability to UpdraftCentral. This explicit step is possibly slightly annoying, but required for maximum security. (Without it, it would be theoretically possible for a malicious logged-in user to use the facilities of UpdraftCentral, if he was sufficiently skilled, even though not permitted by your short-code). If you are only wanting to add this facility to some users, and not all users, then you will want to inspect the UpdraftCentral source code to see the full potential of this filter.


Posted in: UpdraftCentral