mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. Fixes #43919. git-svn-id: https://develop.svn.wordpress.org/trunk@43085 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -555,6 +555,10 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
$caps[] = 'update_core';
|
||||
}
|
||||
break;
|
||||
case 'export_others_personal_data':
|
||||
case 'erase_others_personal_data':
|
||||
$caps[] = is_multisite() ? 'manage_network' : 'manage_options';
|
||||
break;
|
||||
default:
|
||||
// Handle meta capabilities for custom post types.
|
||||
global $post_type_meta_caps;
|
||||
|
||||
Reference in New Issue
Block a user