Skip to content

Command Palette: remove results for items non admin users don't have access to  #61528

@bacoords

Description

@bacoords

Description

Editor-level users are exposed to the command palette and can see search results for pages, templates, and template parts that they don't actually have access to edit

Related #61444
Related #61419

Step-by-step reproduction instructions

  1. Log in as an editor
  2. Enter a page to edit
  3. Type CMD+K to open the Command Palette
  4. Search for a page, template, or template part
  5. Select one and be sent to the "Sorry, you are not allowed to access this page." message

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.5.3
  • Gutenberg 18.3.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Package] Commands/packages/commands[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions