It is possible to filter blocks based on the user role of the current user, but I want to be able to change blocks based on roles of the user whose page I am visiting.
User 1 is an administrator so visiting
no matter what user role the current user logged in has.
if User 1 visits
where user 4 is RoleX they see
Where RoleX block and Administrator block are both created in views.
Is there a way to do this out of the box or do I need to write my own contextual filter