Description
What problem does this address?
I'm working on a site that has users signing up and creating posts, but they can create insert and update reusable blocks. This allows them to bypass moderation, and modify other users posts via these blocks, etc, etc, it's a major headache
I've been trying to exterminate this feature, but I cannot hide the UI components, I cannot filter them, I can't disable them, remove support, etc
I thought I could remove the caapability from their roles, and it is implied this can be done on the .org dev site, but the wp_block
post type reuses the post capabilities so I cannot target non-admin users.
I can find no official method for removing this feature, be it totally or conditionally.
The closest I have found so far is to use wp.data.dispatch('core/block-editor').updateSettings( { __experimentalReusableBlocks: [] } )
to fool the block editor into thinking there are no reusable blocks at the moment, then deliberately crashing on the save post hook if it matches wp_block
.
What is your proposed solution?
Implement capabilities for reusable blocks, and hide UI/UX if the current user does not have the capability to create/view/edit reeusable block posts.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Needs discussion
Activity