• Resolved fillipemontenegro

    (@fillipemontenegro)


    Hello,

    This plugin used to work just fine, but I’m not sure if it got caught in some new WordPress security feature or something.

    I have recently updated WordPress Core to 5.5.1;
    I am using WooCommerce v. 4.5.1;
    I user the “User Role Editor” (by Vladimir Garagulya) v. 4.56.1.

    As an admin, I can still see the “Switch to” link, but:

    1. a non-admin user with the “edit_user” capability cannot switch into some roles
    2. this same user (with “edit_user” capability) can switch into some users with “lesser” roles
    3. there is no “switch_user” capability on the list of capabilities (User Role Editor plugin)

    It seems that now it’s somehow hierarchy based and before it wasn’t? The problem is – IF THAT’S THE ISSUE – with the User Role Editor plugin I cannot quantify the “weight” of each role (so maybe it’s taking it according to the date created or something).

    Nonetheless, it seems to me that the “switch_user” capability would solve this issue.

    I have just found out about this and thought before I even go into the code I’d come here and share this issue. If I have any luck with a solution I will post it here.

    If anyone have been through something similar and found a solution, please be so kind as to share it here.

    Thank you.

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

    (@johnbillion)

    WordPress Core Developer

    Not sure what’s happened here but there’s no hierarchy or weighting involved. It sounds like you might have gotten your capabilities in a muddle with User Role Editor.

    You should be able to grant switch_user as a custom capability in URE, it’s been a while since I’ve used it though.

    The actual capability name is “switch_users” — with an S on the end.

    For some reason, this capability is needed for my Woo “Shop Manager”s in order to access certain customer types, even though they have edit_users – but the Shop Managers also can not edit customers (which are cloned from Customer), so it is probably the same issue as that.

    Having not seen the obscure FAQ entry, I was trying to use the switch-to-user capability – of which I do not understand why two – what is the difference ????? argh.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No switch_user capability (possible post 5.5 update issue)’ is closed to new replies.