Can we display users based on reporting hierarchy?

Can we restrict user visibility ?? if users logs in then he can see only users of his department or his reporting manager. He should not find any other user from other department.