Privacy: require manage_privacy_options capability for showing WP_Privacy_Policy_Content::notice().

Props ocean90.
Merges [43248] to the 4.9 branch.
Fixes #44055.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ian Dunn 2018-05-15 18:03:21 +00:00
parent b9f0dbc332
commit d3ec75932b

View File

@ -1517,6 +1517,10 @@ final class WP_Privacy_Policy_Content {
return;
}
if ( ! current_user_can( 'manage_privacy_options' ) ) {
return;
}
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
if ( ! $policy_page_id || $policy_page_id != $post->ID ) {