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

UI: Add capability check to Add New button #1003

Merged
merged 1 commit into from
Sep 19, 2023

Commits on Sep 19, 2023

  1. UI: Add capability check to Add New button

    Background:
    
    - Take a role like Subscriber which only has `read` capability.
    - Adding `list_users` to an account with a Subscriber role allows the Users admin menu to appear, and the Guest Authors list page to be accessed.
    - However, clicking on the Add New button won't work, as they haven't got permission to edit this post type.
    - Allowing `edit_posts` capability allows the Add New screen to be accessed; currently the `list_authors` capability is used on the handling of the guest author creation.
    GaryJones committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    054d2f6 View commit details
    Browse the repository at this point in the history