code: public List<CmsHistoryProject> getAllHistoricalProjects(CmsDbContext dbc) throws CmsException {
  
          // user is allowed to access all existing projects for the ous he has the project_manager role
          Set<CmsOrganizationalUnit> manOus = new HashSet<CmsOrganizationalUnit>(
              getOrgUnitsForRole(dbc, CmsRole.PROJECT_MANAGER, true));
  
          List<CmsHistoryProject> projects = getHistoryDriver(dbc).readProjects(dbc);
          Iterator<CmsHistoryProject> itProjects = projects.iterator();
          while (itProjects.hasNext()) {
              CmsHistoryProject project = itProjects.next();
              if (project.isHidden()) {
                  // project is hidden
                  itProjects.remove();
                  continue;
              }
              if (!project.getOuFqn().startsWith(dbc.currentUser().getOuFqn())) {
                  // project is not visible from the users ou
                  itProjects.remove();
                  continue;
              }
              CmsOrganizationalUnit ou = readOrganizationalUnit(dbc, project.getOuFqn());
              if (manOus.contains(ou)) {
                  // user is project manager for this project
                  continue;
              } else if (project.getOwnerId().equals(dbc.currentUser().getId())) {
                  // user is owner of the project
                  continue;
              } else {
                  boolean found = false;
                  Iterator<CmsGroup> itGroups = getGroupsOfUser(dbc, dbc.currentUser().getName(), false).iterator();
                  while (itGroups.hasNext()) {
                      CmsGroup group = itGroups.next();
                      if (project.getManagerGroupId().equals(group.getId())) {
                          found = true;
                          break;
                      }
                  }
                  if (found) {
                      // user is member of the manager group of the project
                      continue;
                  }
              }
              itProjects.remove();
          }
          return projects;
      }
docs: Returns a list with all projects from history.<p>
  
  @param dbc the current database context
  
  @return list of <code>{@link CmsHistoryProject}</code> objects
  with all projects from history.
  
  @throws CmsException if operation was not successful