Change WordPress user roles and capabilities Forums Bug Reports User delete/edit permission not working for custom role

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6943
    a.teufel
    Participant

    Hi! I am using the Plugin to specify a “Shop Manager” role for WooCommerce, and i activated all User editing permissions for that role. It should be possible for that role to delete WordPress users, or edit their (address/billing) data. But if I login with that user and try to delete a user (by selecting him and choosing the delete bulk action), there is a confirm button – after pressing it, i get an error that I do not have the permission for this. The user to delete/edit would be a regular customer, no special role like Administrator.
    Is there something I am missing?
    Btw, editing the orders including user data is possible for the role, but I need him to be able to change the default data for users that is visible in the default WordPress user overview.

    Also, i would like to allow that “Shop Manager” role to edit user roles (only specific ones, for example, to switch a user between “customer” and “B2B”), but it seems that it is not possible either? I could not find any specific permission for it, but it should be included in the user_edit permissions, I guess.

    Also, is there a permission to allow the integrated WP tool to erase personal data for data privacy, or can i just use this as Administrator?

    #6944
    Vladimir
    Keymaster

    Hi,

    My test showed that shop_manager with ‘list_users’, ‘edit_users’, ‘delete_users’ capabilities’ can delete selected user with ‘customer’ role successfully. Test user was just created and did not have orders though. Does customer have orders in your case?
    Try to deactivate all plugins except WooCommerce. Will shop_manager can delete user then?

    #6945
    Vladimir
    Keymaster

    Look at this topic for information how to add other roles to the list of roles available for shop_manager for editing/selection.

    #6946
    Vladimir
    Keymaster

    Menu item “Tools->Erase personal data” is protected by virtual user capability ‘erase_others_personal_data’. WordPress maps it by default to ‘manage_network’ for multisite and ‘manage_options’ for single site installation.

    User Role Editor Pro can change this:
    Try to turn ON the “Privacy related (manage_privacy_options, export_others_personal_data, erase_others_personal_data)” option at the “Settings->User Role Editor->Additional Modules” tab. Grant ‘erase_others_personal_data’ capability to your role then. Will it help?

    #6949
    a.teufel
    Participant

    hi! thank you, the tip with the external link was the key to success for editing and deleting users. i am using the plugins german market and b2b market, they add customer roles with german roles, so i had to add the german roles to the allowed roles for shop managers.
    will keep you in the loop about the privacy thing, thank you again!

    #6952
    a.teufel
    Participant

    your tip about the privacy setting helped too, thank you! i am able to erase personal data as shop manager too 🙂

    #6955
    Vladimir
    Keymaster

    Hi!

    Excellent! Thanks for the feedback.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.