Restrict Company

There are two companies in the database. I want a category of users(say branch users) to be prevented from accessing a company. They will access one company while HO will have access to both companies. How to acheive that.