Show Targeted Content Based on Content Field and User Roles
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