• Resolved Rebecca L

    (@rebeccall)


    Hello,

    We are using this plugin to limit the amount of admin capabilities our shop managers have. However, they need to be able to add, edit and remove users on a daily basis.

    This has been set up on the plugin for a month now but the shop managers still cannot do any of the above.

    I have updated the plugin to the most recent version but this hasn’t fixed it (Version 2.5.1).

    To confirm, under Users I have selected all the options for the Shop manager role, but when logged in as a Shop manager, the username is greyed out and they only have the remove or view button (view button takes them to our website). They also can only add existing users, not new.

    Any ideas? I have screenshots but don’t have the option to upload them here.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    Hi @rebeccall

    First, A role cannot edit another role that’s above them in the hierarchy.The role level can be seen in the advance tab of role edit screen. So, the user role level needs to be above the user they are trying to manage

    Second, In some specific cases, like the user role Shop Manager by Woocommerce, they add some limitations to prevent a few actions like editing users.

    So for your issue, if you want some specific user role (not from Woocommerce) to be able to edit users, their role level should be higher.

    And if you want the shop manager role to be able to edit users, you can try this filter officially from Woocommerce

    /**
     * Allow Shop Managers to edit and promote users with the Editor role 
     * using the 'woocommerce_shop_manager_editable_roles' filter.
     *
     * @param array $roles Array of role slugs for users Shop Managers can edit.
     * @return array
     */
    function myextension_shop_manager_role_edit_capabilities( $roles ) {
        $roles[] = 'editor';
        return $roles;
    }
    add_filter( 'woocommerce_shop_manager_editable_roles', 'myextension_shop_manager_role_edit_capabilities' ); 
    Thread Starter Rebecca L

    (@rebeccall)

    Hi Riza,

    Thanks for your reply.

    I’m super admin so my role is above the Shop Managers I’m trying to edit.

    I’ve just added that filter to my functions.php file but it hasn’t actually changed anything. Does it need to go somewhere else?

    If I can’t get this to work then I may have to create an entirely new role and see if that works. The issue might be Woocommerce, as you say.

    Thanks

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    Yes, please try to create custom role first which more simple.

    Thread Starter Rebecca L

    (@rebeccall)

    Hi Riza,

    I’ve just created a custom role named ‘warehouse staff’ which has been given a level 10 and all the access they need, including editing users (the users they need to edit have customer roles so they are lower in the hierarchy). However, it’s still not working. They still cannot actually click on someone and edit their information. It stays greyed out.

    I don’t want to give everyone admin access as that basically opens the floodgates, hence why we are using this plugin.

    Is there any reason for this to not work, even with the custom role? It feels like no mater what I do within the plugin, it isn’t actually responding.

    Thanks

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    It sounds like you are currently creating custom role by scratch meaning they have low-capability user role and adding limitations by enable additional access. This is usually a good strategy – easy to understand and safely defaults to no extra access.

    However, in cases like this, it may be necessary to use the opposite configuration strategy: start with a high-capability role and use Permissions to limit the application of those capabilities.

    Try creating custom role by copying from the role “Editor” then giving access to edit users, and disabling unneeded access. I found it works on my testing.

    Thread Starter Rebecca L

    (@rebeccall)

    I’ve actually just solved this by switching to a different plugin.

    We use a site network and this option (manage_network_users) was hidden on this plugin, but on User Role Editor I could see that this option was unticked. Once ticked, my Shop Managers could edit and remove users.

    Thanks anyway.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Shop managers still can’t edit users’ is closed to new replies.