Change WordPress user roles and capabilities Forums How to or FAQ Best Approach to Creating Custom Roles on WordPress Multisite Installation

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1735
    GRC WordPress Owner
    Participant

    Hello!

    We are working to create custom roles on a multisite installation, including customizing access to menus and widgets. These custom roles will be used on all sites in the multisite network.

    Before, when using URE (free) to customize capabilities across roles across the network, we’d use the following method:

    Go to main site, configure role, select “Apply to All Sites,” then select “Update.” Results saved in every site!

    With URE (pro), the configuration of pro’s “Admin Menu” and “Widgets” are not saving across the entire network, just on the main site being edited.

    What is the recommended process for creating a custom role with custom display of menus and widgets (“package”) across a multisite?

    When I try to import a role from the main site into my sub site, the “Admin Menu” and “Widgets” updates do not transfer.

    Confirming:

    Latest Version of URE Pro: 4.19

    Test user role has capabilities of manage_options and edit_theme_options.

    Thank you!

    #1737
    Vladimir
    Keymaster

    Hi,

    The best way to replicate all roles from the main site to all subsites of the network is to click “Update Network” button at User Role Editor opened under “Network Admin – Users”.

    When you click “Update Network” you should see popup window like this
    https://storage.googleapis.com/role-editor/downloads/support/update-network-widgets-access.png
    There is an option there to copy widgets access restrictions from main site to all others with roles together. Does it work as expected?

    I confirm that menu access data is not copied currently. Export/Import data include only roles itself without extra data, like menu, widgets, etc. permissions for that role.
    Initially, as different sites may have different plugins and themes set I did not think that such feature will be requested by users. But I see now, that it may be useful for someone. Your report is not the 1st.

    I plan to add these features to one of the future updates: replicating and export/import all User Role Editor saved data, not roles only.

    #1740
    GRC WordPress Owner
    Participant

    Vladmir,

    Thank you for this detail and clarification.

    I began to replicate the following:

    1. URE at Network Level, Update Widgets for Custom User Role.
    /wp-admin/network/users.php?page=users-user-role-editor-pro.php

    2. Save, but then page changes to Main Site URE page (Possible confusion)
    wp-admin/users.php?page=users-user-role-editor-pro.php

    3. I return to URE at Network Level, by hitting back in my browser, selecting Update Network, and confirming checkbox “[x] Widget access restrictions.”

    4. CHANGE: Browsing as user with Custom User Role, with more than one site, I see that my widget modifications are updated on the Main Site, but have NOT replicated to other Subsites on the network.

    5. I also exported the role from Main Site and imported it into Subsite, but the widget modifications did NOTE transfer to any Subsite.

    Environment: multiple sites on network with same theme and plugins installation. New sites are duplicated with Backup Buddy or NS Cloner, but overall we look for methods to perform changes to 1. roles/capabilities, 2. menus, and 3. widgets (in order of priority) on a network-wide level.

    Thanks in advance.

    P.S. We recognize the amount of work and research documentation you have done in developing this plugin! Though it might be convenient to do everything role/capability-wise with one plugin 🙂 , we are also investigating multsite capabilities Admin Menu Editor Pro: http://adminmenueditor.com/

    #1741
    Vladimir
    Keymaster

    Hi,

    Thanks for the information.
    I confirm the 2 bugs you found. I will develop the fix.

    #5395
    armel
    Participant

    Are menu access data now also updated with role update?

    I have tried to update the admin menu access data for sites already installed in my network.

    When I click on update network and then check the box ”Admin menu access restrictions”. Then later check if changes where applied on subsites. I realised that there is no modification in the admin menu.

    #5396
    armel
    Participant

    I get this error message

    Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/network-addons-data-replicator.php on line 98

    #5397
    armel
    Participant
    #5398
    Vladimir
    Keymaster

    @armel,

    Thanks for this report. I confirm the bug introduced with version 4.49.2. It’s related to the core version 4.48:
    Update: Multisite: Sites list is not requested from database on every page load in order to increase page load speed.

    I will post here when the fix will be ready.

    #5400
    Vladimir
    Keymaster

    I published version 4.49.3 to fix the reported issue with add-ons data network replication.

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