• Resolved PthPndr

    (@pthpndr)


    What user capabilities are needed to allow switch users to work?

    I ask because under the plugin details it’s mentioned that it requires “edit users” to allow switching however on our single site installations the WooCommerce Shop Manager can switch users with no issues (which is good for us) and does not have the “edit_users” capability.

    But my problem is that on multisite installations the Administrator role works but the Shop Manager is not allowed to switch users. I tried giving them the edit_users capability but it did not make a difference.

    Are there any other capabilities that are required?

Viewing 1 replies (of 1 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    All the capability checks ultimately map to whether the user can edit the target user. Most of the time this means that the edit_users capability is used, but WooCommerce overrides this to allow Shop Managers to edit Customers, but not users with other roles. Correspondingly this allows Shop Managers to switch to Customers, but not to users with other roles.

    On a multisite installation, only Super Admins can edit users. Neither a regular Administrator (who is not a Super Admin) nor a Shop Manager can edit users, therefore they can’t switch to them. If the Administrator user on your site can edit and switch to other users then that either means they’re also a Super Admin or that you’re using the User Switching for Regular Admins add-on plugin. That plugin allows regular Administrators to switch, but it specifically only deals with Administrators, not users of other roles such as Shop Managers. If you’re interested in using that plugin then please read through the description first as it explains the effects of using it.

    All that said, there is not currently a way to grant a Shop Manager the ability to switch to a Customer on a multisite installation unless you use a role management plugin which allows this to be changed. I believe the User Role Editor plugin should allow this, although I haven’t use it in a long time so let me know how you get on.

Viewing 1 replies (of 1 total)

The topic ‘Capabilities needed to switch users’ is closed to new replies.