I have a post type called promo that I am querying on the front end. I have created several user roles(System Admin, Company Admin, Account Coordinator ) and I want to only allow access to the posts using a structure like the image below. Basically and Admin can view all posts, Company Admins can view all account coordinators for that companies posts and Account Coordinators can only view their own posts and by posts I mean a custom post type “promo”.
Currently I am restricting access to the author with something like
$args = array(
'author' => $current_user->ID,
);
$promo = new WP_Query($args);
I left most of the code out for brevity. Does anybody know of a way to accomplish this viewing structure?