WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/02/2018 03:48:27 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Limit export and erasure to super admins on Multisite.

Multisite networks have a variety of use cases, and in many of them single-site administrators are not trusted to take actions that affect the whole network, require making decisions about legal compliance, etc. By default, those actions should require super admin capabilities. Plugins can be used to override that behavior if a particular site's use case calls for it.

Props allendav, jeremyfelt, iandunn.
Merges [43085] to the 4.9 branch.
Fixes #43919.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/capabilities.php

    r42607 r43111  
    540540        }
    541541        break;
     542    case 'export_others_personal_data':
     543    case 'erase_others_personal_data':
     544        $caps[] = is_multisite() ? 'manage_network' : 'manage_options';
     545        break;
    542546    default:
    543547        // Handle meta capabilities for custom post types.
Note: See TracChangeset for help on using the changeset viewer.