I have a views page with a menu tab in user profile, I want to hide it for some user roles.  

I tried with hook\_menu\_alter  

```
function hide_tabs_menu_alter(&$items) {
    global $user;
    if (in_array('gerant', array_values($user->roles))) {
        $items['user/%user/infos']['type'] = MENU_CALLBACK;
    }
}

```

1. This doesn't hide the tab, but it works for other tabs -created by
other modules- like user/%user/contact.
2. I wanted this user still be able to see this tab in other users
profile.

### To add more information

There are two roles (*gerant* and *etudiant*). The permission should be *View own info page* which should be assigned to *etudiant*. *gerant* should not have it, but it should still be allowed to see user/%user/infos in *etudiant*'s profiles.