Skip to content

Copy capabilities from menu items to wp_navigation#2056

Closed
spacedmonkey wants to merge 2 commits intoWordPress:trunkfrom
spacedmonkey:fix/permission-navigation
Closed

Copy capabilities from menu items to wp_navigation#2056
spacedmonkey wants to merge 2 commits intoWordPress:trunkfrom
spacedmonkey:fix/permission-navigation

Conversation

@spacedmonkey
Copy link
Copy Markdown
Member

@spacedmonkey spacedmonkey commented Dec 16, 2021

Trac ticket: https://core.trac.wordpress.org/ticket/54487


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@getdave
Copy link
Copy Markdown
Contributor

getdave commented Dec 17, 2021

@spacedmonkey @hellofromtonya I think we should adjust this change set to match https://github.com/WordPress/gutenberg/pull/37454/files#diff-68aa3e914d52bce59d8cfcac6c7a10cad3bb8dca6021d00be35bdf546a6ea161R53.

'capabilities'          => array(
    'edit_others_posts'      => 'edit_theme_options',
    'delete_posts'           => 'edit_theme_options',
    'publish_posts'          => 'edit_theme_options',
    'create_posts'           => 'edit_theme_options',
    'read_private_posts'     => 'edit_theme_options',
    'delete_private_posts'   => 'edit_theme_options',
    'delete_published_posts' => 'edit_theme_options',
    'delete_others_posts'    => 'edit_theme_options',
    'edit_private_posts'     => 'edit_theme_options',
    'edit_published_posts'   => 'edit_theme_options',
),

If we don't then as things stand in Gutenberg folks with lower permissions won't be able to "read" Navigation posts. That's why we adjusted the permissions as per WordPress/gutenberg#37454 (comment).

Copy link
Copy Markdown
Contributor

@audrasjb audrasjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed patch looks good to me 👍

@getdave
Copy link
Copy Markdown
Contributor

getdave commented Jan 5, 2022

@hellofromtonya can we close this one out now?

@hellofromtonya
Copy link
Copy Markdown
Contributor

Thanks for the ping @getdave. Yes, this can be closed.

Committed via https://core.trac.wordpress.org/changeset/52400.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants