[wp-trac] [WordPress Trac] #44176: Un-map Privacy Capabilities
WordPress Trac
noreply at wordpress.org
Mon Jan 27 10:15:43 UTC 2020
#44176: Un-map Privacy Capabilities
-------------------------------------------------+-------------------------
Reporter: desrosj | Owner: xkon
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.4
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: has-patch has-screenshots early | Focuses:
needs-dev-note needs-testing |
-------------------------------------------------+-------------------------
Changes (by garrett-eclipse):
* keywords:
2nd-opinion has-patch dev-feedback has-screenshots reporter-feedback
early needs-dev-note
=> has-patch has-screenshots early needs-dev-note needs-testing
Comment:
Thanks for the patches @xkon & @pbiron and for the flag there @Ov3rfly
this is working nicely and would be great to have addressed early in 5.4
here for testing.
I've made a minor adjustment in
[https://core.trac.wordpress.org/attachment/ticket/44176/44176.5.diff
44176.5.diff] to provide the following updates;
1. Added the `@global` to the `upgrade_540` method.
2. Updated the expected db_version to match the current in trunk `47018`.
This allows testing by setting your db_version in the options table to be
less than 47018. This will need to be updated during 5.4 release.
3. Updated the Settings taking it out of the conditional to not change
existing functionality and just replace it when the user has
manage_privacy_options but not manage_options. Also updated to `options-
privacy.php` in this scenario so the link directs to the Privacy Settings.
4. Addressing the PHP Unit failures I've updated the test coverage for the
capabilities moving them to primitive capabilities and setting them to
support `administrator` and for the `manage_privacy_options` also added
`editor`
It would be nice to get some testing on multisite as the change from meta
caps to primitive ones means we're adding the capabilities to the
administrator and editor and there's no longer the is_network conditional;
` $caps[] = is_multisite() ? 'manage_network' : 'manage_options';`
I've uploaded some screenshots illustrating the privacy page and settings
are editable by editors.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44176#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list