how do I hide course list and description from users who are not assigned to those course?

I would like to have setup where anoymous users would only get prepared page with public info which is easy in WP and only let users see courses which have been assigned to them.

This way anonymous users do not see any courses and courses descriptions at all and properly registered AND assigned users only see their assigned courses.