public function hasGroup($name) {
    $group = App::make('group_repository')->findByName($name);
    $user = $this->getLoggedUser();

    if (!$user) {
      return false;
    }
    return $user->inGroup($group);
  }