Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › allow role to edit privacy policy page
- This topic has 4 replies, 2 voices, and was last updated 5 years, 3 months ago by dzamanakos.
-
AuthorPosts
-
07/08/2019 at 16:21 #5864dzamanakosParticipant
Hi, i’ve read that in recent wp versions, only administrator can change the privacy policy page text.
How can via your pro plugin that i own to add edit capabilities to this page for some roles? Or at least for editor.
best regards,08/08/2019 at 03:15 #5865VladimirKeymasterHi,
Admin menu item “Settings->Privacy” and selected “Privacy” page editing are protected by ‘manage_privacy_options’ user capability.
‘manage_privacy_options’ capability is mapped by default to ‘manage_options’ capability.So after ‘edit_pages’, ‘edit_published_pages’, ‘edit_others_pages’ WordPress checks ‘manage_privacy_options’ (‘manage_options’ by default) capability for privacy page too:
/* * Setting the privacy policy page requires <code>manage_privacy_options</code>, * so editing it should require that too. */ if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); }
URE Pro has a related option at the “Settings->User Role Editor->Additional Modules” tab – ” Privacy related (manage_privacy_options, export_others_personal_data, erase_others_personal_data)”. It’s located under “Use additional capabilities section” at the bottom of the form.
With this option activated URE maps ‘manage_privacy_options’, ‘export_others_personal_data’, ‘erase_others_personal_data’ capabilities to the ‘manage_privacy_options’, ‘export_others_personal_data’, ‘erase_others_personal_data’ correspondingly instead of default ‘manage_options’.But due to some glitch discovered during recent test user with ‘manage_privacy_options’ capability still does not have access to the ‘Settings->Privacy’ menu item. It needs investigation and fix.
If you does not plan to give access to this menu item for your editor, that’s it. Just select ‘Editor’ role at “Users->User Role Editor” and grant to it
‘manage_privacy_options’ capability. It should be enough in order to allow to editor role to edit your pre-selected privacy page.08/08/2019 at 12:19 #5866dzamanakosParticipantHi, thank you for your reply.
I dont have such capability, i mean with that name.
Should i add it with button “add capabiity”?
this is what i see : https://ibb.co/x8vNZYP
I have version Version 4.51.1best regards,
08/08/2019 at 13:11 #5867VladimirKeymasterDid you turn ON 1st the “Privacy related” checkbox at “Use additional capabilities section” at “Settings->User Role Editor->Additional Modules” tab?
09/08/2019 at 08:09 #5869dzamanakosParticipantHi, thank you for your help, didnt checked this before.
best regards,
-
AuthorPosts
- You must be logged in to reply to this topic.