• Resolved damaco04

    (@damaco04)


    Hi there, thanks for this plugin, it is awesome.

    not sure if I am doing something wrong but it has taken me several hours now, I have a wordpress site with 500 posts or so, I am creating several editor users, and each of them can only edit some specific posts.

    in the control panel when i remove access to all posts to a user and then grant access to the posts he is supposed to edit everything works fine.

    but when I login with that user, and then access “all posts” page, nothing comes up, that is because there are 500 posts loaded (but hidden) and the posts that i granted access are in page 3 or 4 or 10.

    is there anyway that the posts that i granted access to the specific users are in page 1? or maybe that the page that i did not grant access dont load at all?

    here are some screenshots, you will notice ath the top, all post were loaded, and the posts that this specific users has access to, are in page 2, so when he logs in he will think he has nothing to edit, because nothing is shown when page first loads

    https://www.dropbox.com/s/poboohvj9oishj6/page%201.png?dl=0
    https://www.dropbox.com/s/cdarg3nw9tzu23g/page%202.png?dl=0

    hope you have a great day.

    regards,
    Danilo

    https://ww.wp.xz.cn/plugins/advanced-access-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Danilo,

    That is a great feedback and catch! We are going to work on solution and provide the fix asap.

    Regards,
    Vasyl

    Hi Danilo,

    There is quite a problem with in covering your case with AAM. So let me explain it and hopefully you’ll be able to understand better how all this works.

    Originally WordPress does not support access control for posts or pages. It was never designed/implemented this way and assumes that all the posts are available for listing.

    When WordPress requests list of posts from the database, it performs a huge procedure with hundreds of different conditions and filters. Then it executes the query and fetch the result. AAM filters actually only the result. That is why you see so weird behavior when it comes to more than 20 posts (one page).

    The possible solution for that is to inject some additional functionality into query building process BUT there is a HUGE problem. AAM does not know ahead what posts are restricted from listing (in your case your have over 500 restricted by default and only few allowed). That is why AAM has to go through each posts in your website and check if it is restricted or not. It means, that AAM has to perform additional 500+ queries to database for that. With AAM Plus Package (when post can inherit settings from parent category or from the default settings), the number of queries might even double or triple.

    Unfortunately we can not implement this functionality because it might overload a lot of website that do not use this functionality.

    You might consider simply restrict access to read and edit posts but leave listing unchecked.

    Thank you for your interest in AAM.
    Vasyl

    Hi damaco04,

    You actually inspired us to create an extension AAM Post List that can help you to solve your problem. You can try before it goes in official release tomorrow.

    Get our development version from GitHub and install AAM Post Filter extension (it is free).

    Please let us know if it works for you.

    Regards,
    Vasyl

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Post Access Issue’ is closed to new replies.