code: private List<NavigationEntryInterface> recursiveGetEntries(
        final List<NavigationEntryInterface> pnavigationEntries) {
      if (pnavigationEntries == null) {
        return Collections.emptyList();
      }
      return pnavigationEntries.stream().filter(entry -> entry.canReveal()).map(entry -> {
        if (entry instanceof NavigationEntryFolder) {
          return new NavigationEntryFolder(entry.getMenuValue(), entry.isOpenOnStartup(),
              recursiveGetEntries(((NavigationEntryFolder) entry).getSubEntries()));
        } else {
          return entry;
        }
      }).collect(Collectors.toList());
    }
docs: get all navigation entries that can be displayed by a given user.
  
  @param pnavigationEntries entries to test
  @param puser the user to test
  @return the navigationEntries