Command Palette lets unauthorized users switch to Code Editor #57604
Labels
[Package] Commands
/packages/commands
[Package] Edit Post
/packages/edit-post
[Package] Edit Site
/packages/edit-site
[Type] Bug
An existing feature does not function as intended
Description
When access to the Code Editor is disabled (via $settings['codeEditingEnabled'] = false; ), it can still be accessed using the Command Palette.
Step-by-step reproduction instructions
add_filter( 'block_editor_settings_all', 'disable_code_editor' ), 10, 2 );
function disable_code_editor( $settings, $context ) {
$settings['codeEditingEnabled'] = false;
return $settings;
}
Screenshots, screen recording, code snippet
Environment info
WP 6.4.2, no Gutenberg plugin
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: