Show Targeted Content Based on Content Field and User Roles I'm looking for a way to show specific targeted content based on a content type's field and user role. 

For example, if user1 has a "Content Group 1" role, then the view should show content pieces with "field_content_grouping" == "Content Group 1". User2 having a "Content Group 2" role should only be able to see "Content Group 2" and so on. Both roles &amp; field values are exactly the same.

I'm looking for the best way to properly execute this. I've seen people do similar things with pre-render for views or views query alter hooks. My general line of thinking is:


Before rendering views get User roles: Loop and check roles against a specific field "field_content_grouping" - if there is a match, continue else unset node from view.
Return full results (sans content pieces without a matching field &amp;
role).


What's the best way to accomplish something like this? Or am I completely on the wrong track all together? Any and all assistance is greatly appreciated, thanks!
You can make your content field a taxonomy term and you can accomplish this with a simple view without any custom coding.

If we assume


vocabulary Departments
user has field Departments
some users with department selected 
token and views_argument_token installed


Add a content view 


Add any relevant filters (content types, etc)
Add user relationship
Add contextual filter Has taxonomy term id


Provide default value > token and fill in the current user's selected term id which in this case is [current-user:field_department:target_id]
use Browse available tokens to find the relevant token



Here is a screenshot of a working view