Generated with the help of an LLM.

Problem/Motivation

The paste styles and delete styles API routes check entity access only. A profile without the Styles menu island can still change a node's styles through them.
Publish, restore, revert and save as preset require their island since #3548769: Security: availability of endpoints according to islands.

Proposed resolution

Add _display_builder_island: 'menu_styles' to display_builder.api_paste_styles and display_builder.api_delete_styles.

Remaining tasks

  1. Kernel test: both routes denied when menu_styles is off in the profile.
  2. Fix.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Status: Active » Needs review
mogtofu33’s picture

Status: Needs review » Fixed

Seems small enough and clear enough to be merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mogtofu33 committed ffe10f3f on 1.0.x
    fix: #3637737 Gate the paste and clear styles routes on the Styles menu...