• Resolved teamkipp

    (@pwteamkipp)


    Hi,

    I have a general question:
    Is it possible to give a user access to individual areas or plugins for revision? The user now has the role “editor”, but has no access to certain plugins & settings, which he should have … for example to the plugin “WPForms” & “UpdraftPlus backups”.

    Many thanks and best regards,
    Pascal

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Anderson

    (@davidanderson)

    Hi Pascal,

    What would be the aim of doing this? Anyone to whom you give access to the ability to access and restore backups has, thereby, complete control over your site – he is a de facto administrator. For example, he can take a backup, then download the backup to his computer, edit the backup to make his user an administrator, upload the backup, and then restore it. In effect, he can do anything he likes to the site via adjusting the backup. So, it does not make sense for anyone who is not an administrator to be allowed to manage backups.

    David

    Thread Starter teamkipp

    (@pwteamkipp)

    Hi David,

    Thanks for your reply. From that point of view I agree with you, it wouldn’t make sense. However, we have customers who want to maintain parts of the website themselves, such as page content, blog posts, forms etc. and I have asked the customer to create a backup before any major changes in case there are problems during their changes. Then we have the option of reverting to a backup.
    The customer is not in a position to download a backup, become an admin or change other things and then upload them again, nor is it in their interest – it is just as important to them that the site is saved and they don’t want to get into mischief.

    Best regards, Pascal

    Plugin Author David Anderson

    (@davidanderson)

    Well, you can do it with this code snippet; this will also open things up for someone with the Editor role:

    add_filter('updraft_user_can_manage', function($can) {
    
       $current_user_roles = wp_get_current_user()->roles;
       return ($can || in_array('editor', $current_user_roles));
    
    });

    Note that taking a backup before editing a post or page is redundant, since WordPress already saves revisions of all updates in the database: https://www.ads-software.com/documentation/article/revisions/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow user roles for individual plugins’ is closed to new replies.