Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy capabilities from menu items to wp_navigation #2056

Closed

Conversation

spacedmonkey
Copy link
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
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
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
Contributor

getdave commented Jan 5, 2022

@hellofromtonya can we close this one out now?

@hellofromtonya
Copy link
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