I am trying to: control access to certain member listings
Link to a page where the issue can be seen: hidden link
I expected to see: filtered member list (the 'Test Member' should not show when not logged in)
Instead, I got: all members listed
Ticket submitted by Toolset contractor Chuck Gregory on behalf of Brendan Moran
Hi, Access is designed to help you hide content on a post in a restricted post group, but restricted post titles may still appear in search results or View results. Unfortunately there's not a great way to hide restricted posts from View or Archive results right now. The only option is to use inline access_control shortcodes in the Loop Output, but this can be problematic if your View or Archive uses pagination because the conditionals will cause inconsistent counts.
Our developers have a feature request in place that will integrate Access and Views like this, but I don't have a timeline for its delivery. The best place to keep up with new feature releases is our blog: https://toolset.com/blog
Thank you for your reply. I finally realized that what I was describing could be accomplished by changing the wordpress visibility for the member posts that needed to be protected. By making these private, I not only hid the posts themselves but also removed them from lists.
But...
This had the effect of hiding the posts for everyone. Even admin. I messed with settings in access, even went so far as to enable 'read private posts' and 'read private pages' for everyone except guests. No help.
In a last-ditch effort I decided to deactivate the Toolset Access plugin. And now everything works.
So, I need help figuring out what happened; is this a huge bug or did I do something wrong. I'm leaning toward bug. We do have a working solution on the site but I've checked 'I still need help' because I think this is an issue with the plugin that needs to be resolved.
Thanks, Chuck.
The permissions for reading private posts are specific to the post type. So if your Member post slug is "member" you will have to add a custom capability "read_private_members" in the Change Permissions dialog with Access active.
May I log in to your site to see what's going on? Please provide login credentials in the private reply fields here.
Seems to be working for me. I believe you need to bring the native Posts type under Access control to see the changes applied to custom post types. Here are the steps I took, and a screenshot of the results attached:
- Activate Toolset Access
- Go to Toolset > Access Control > Post Types and bring the native Posts type under Access control. Modify the configurations as needed.
- Go to Toolset > Access Control > Custom Roles and hover over Administrator role. Click "Change permissions", then go to the "Custom capabilities" tab. Add "read_private_members" and save.
- Refresh the Member page on the front-end of the site.
I reverted all of these changes for now.
Thank you for the detailed instructions. It works.