you can do it from /libs/granite/ui/components/shell/userproperties/userproperties.jsp file, which render impersonate.
you can write your logic to identify set of user to hide impersonate and update value of showImpersonate variable as false.
Arun Patidar