
3 answers
You don't need to use Apex for that. You can use Profiiles or Permission Sets to determine which users can see each Tab. When the User logs in, the only menu choices they see will be the Tabs they have access to. See Admin Setup->Manage Users->Profiles (or Permssion Sets) to define Tab access.