This conditional is flawed because it tests permissions for the same post group for all posts in the loop, not the post group of the current post in the loop:
if($current_user->user_level >= $roles[$access_option['wpcf-custom-group-5958a604ed3dce988ff600b265cd08c3 ']['permissions']['read']['role']]){
I can share the fix, but it's pointless - user_level simply is not a reliable way to determine which Users have permission. You can manipulate individual capabilities in Access independent of the User level, so testing the user level isn't helpful when you really need to test capabilities.
For now, let's disregard the access_check_permission_func function and shortcode. Let's return to the original post group conditionals, and I can explain in a bit more detail how these conditionals can be used in conjunction with Access Control shortcodes to show and hide specific content in a View. I was focused on the wrong part of the problem earlier so I didn't share enough details for you.
The main problem is that Access Groups do not show or hide content in Views, as you have noticed. If a disallowed User clicks the post link from the View and tries to visit the post, the Access Group permissions are applied and only Users in the allowed groups can see those posts. To restrict visibility of content in the View, however, there is another step involved. You have noticed that the conditionals really just test to see if a post is in a specific post group. If applied alone, however, these conditionals do not consider the current logged-in User and whether or not s/he belongs to the specific group tested in the conditional. Access Control shortcodes ( https://toolset.com/course-lesson/access-control-texts-inside-page-content/ ) can test whether or not a specific User has a specific role, but not whether or not the current post belongs to a specific Post Group. Combining the conditional and the Access Control shortcode will give you full control over who sees which posts, though it's a bit tedious.
First, set up a post group conditional in your View to test if the current post in the loop belongs to a specific post group, for example, Members or Partners i.e. wpcf-custom-group-1cd17454e740d7f32cc3dd4b524312fc:
[wpv-conditional if="(( $(_wpcf_access_group) eq 'wpcf-custom-group-1cd17454e740d7f32cc3dd4b524312fc' ))"]
The post [wpv-post-link] belongs to the Members or Partners group.
[/wpv-conditional]
All Users will see the text in this conditional if the current post is in the Members/Partners post group. But you want to go one step further, and restrict this to only those users in the Members/Partners group (and admins). That's where Access Control shortcodes can come into play. In the shortcode configurations, you would choose the roles that have read access in the Members/Partners Post Group. The system will generate the proper shortcode syntax and insert it for you:
[toolset_access role="Administrator,Members or Partners of the Project" operator="allow"]
This text is visible to Admins and Users in the Members/Partners User role
[/toolset_access]
Nest the conditional and the Access Control shortcode for full visibility control in the View Loop (it doesn't really matter which order you nest the components):
[wpv-conditional if="( $(_wpcf_access_group) eq 'wpcf-custom-group-1cd17454e740d7f32cc3dd4b524312fc' )"]
[toolset_access role="Administrator,Members or Partners of the Project" operator="allow"]
This text is visible to Admins and Members/Partners Users when the current post is in the Members/Partners group.
[/toolset_access]
[/wpv-conditional]
I hope this helps clarify the complete solution. This approach is tedious because depending on the case, you may need to create quite a few conditional and Access Control shortcode combinations to support the different post groups and user roles. In a pinch it could work as a proof-of-concept. During our team meeting yesterday, our team leader mentioned that our developers have recently provided a more efficient way to handle this specific problem, and he was in the process of putting together an example for us to share. I will reach out to him and try to get that expedited up for you, so I can give you the best solution. I'll let you know what I find out, but I wanted to make sure you had this information since you mentioned the timeline, and get your feedback.