• Hi I created a custom post type (but did the same test with posts). What happend is I put a flag on the following read_private_posts, edit_private_posts, delete_private_posts, create_posts. The custom post type link and posts link on the left side menu in the backoffice doesn’t show up. Also if a url is open in the browser on the back office url specific of the custom post test conten I can see “unable to see this content” (free translation from – Non sei autorizzato a modificare questo elemento.). To make visible and editable the post I need to flag also edit_posts. In this case I see the link to the custom post type on the backoffice left side menu and I can open the page to view and modify any of my custom post type. The thing is I can modify any of the custom post type also what was created from others users. What I want is that any user should be able to create and modify only it’s own content. How can I? What do I do wrong?
    WordPress – Version 5.4.2
    User Role Editor – Version 4.55.1

    • This topic was modified 5 years, 11 months ago by ilfungo.
Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    ‘edit_posts’ is the base permission. It protects menu ‘Posts’, allows to see the posts lists and edit own not published posts. All the rest ‘edit_’ permissions for posts are additional levels of control.
    If you can edit_posts but post is published, WP will check if you can ‘edit_published_posts’.
    If you can edit_posts but post was created by other user, WP will check if you can ‘edit_others_posts’.
    If you can edit_posts but post is private, WP will check if you can ‘edit_private_posts’.

    The most of times custom post type are defined with the default capability type ‘post’, and thus WP checks for all such CPT the same list of permissions as for WP built-in posts: edit_posts, edit_others_posts, etc. Read more about permissions for custom post types here.

Viewing 1 replies (of 1 total)

The topic ‘edit_private_posts not working as expected’ is closed to new replies.