[wp-trac] [WordPress Trac] #45423: Use custom capabilities for the block editor's reusable blocks.
WordPress Trac
noreply at wordpress.org
Mon Jan 21 23:15:52 UTC 2019
#45423: Use custom capabilities for the block editor's reusable blocks.
------------------------------------------+-----------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.2
Component: Role/Capability | Version: 5.0
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------
Changes (by pento):
* owner: pento => (none)
Comment:
@flixos90, @johnbillion: That's basically what Core is already doing,
except it's happening slightly before the `user_has_cap` filter, in
`map_meta_cap()`.
The issue isn't in granting the capabilities, the issue appears to be in
how custom post types interact with these "fake primitive" capabilities,
particularly when trying to map them to other fake primitives: they don't
seem to map correctly.
I'll commit the fix in #45373 for now, and we can see what feedback we get
during beta, but we may need to revisit this ticket before 5.1. I don't
really want to add caps to the database (hence why we didn't in 5.0), so
I'd appreciate y'all making some time to dig into this further.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45423#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list