Hide tab created by views if user has a specific role
Finally it worked for me using hook_menu_local_tasks_alter(), thanks to drupal developers community.

function hide_tabs_menu_local_tasks_alter(&amp;$data) {
  if (arg(0) == 'user' &amp;&amp; is_numeric(arg(1))) {
    $uid = arg(1);
    $account = user_load($uid);
    if (in_array('gerant', array_values($account-&gt;roles))) {
      foreach ($data['tabs'][0]['output'] as $key =&gt; $value) {
        if ($value['#link']['path'] == "user/%/infos") {
          unset($data['tabs'][0]['output'][$key]);
        }
      }

    }
  }
}