public function checkAccess(array $tree) {

    if ($this->account->id() != 1) {
      $account_roles = $this->account->getRoles();
      // Define routes to hide for a role.
      // 'content' => 'system.admin_content',
      // 'structure' => 'system.admin_structure',
      // 'config' => 'system.admin_config',
      // 'reports' => 'system.admin_reports',
      // 'themes' => 'system.themes_page',
      // 'people' => 'entity.user.collection',
      // 'help' => 'help.main'.
      $routes = [
        'contentmanager' => [
          'config' => 'system.admin_config',
          'reports' => 'system.admin_reports',
          'help' => 'help.main',
        ],
        'sitemanager' => [
          'help' => 'help.main',
        ],
      ];

      // Define which routes to hide based on hierarchy.
      if (in_array('sitemanager', $account_roles)) {
        $hide_routes = $routes['sitemanager'];
      }
      elseif (in_array('contentmanager', $account_roles)) {
        $hide_routes = $routes['contentmanager'];
      }
      else {
        $hide_routes = [];
      }

      foreach ($tree as $key => $element) {
        // Always hide the admin_toolbar_tools.help.
        $plugin_id = $tree[$key]->link->getPluginId();
        if ($plugin_id === 'admin_toolbar_tools.help') {
          unset($tree[$key]);
          continue;
        }

        $route = $tree[$key]->link->getRouteName();
        if (in_array($route, $hide_routes)) {
          unset($tree[$key]);
          continue;
        }

      }
    }

    return $tree;
  }