code: function(forceRefresh) {
              if (cachedProjectData && !forceRefresh) {
                Logger.debug('ProjectsService: returning cached project data');
                return $q.when(cachedProjectData);
              }
  
              Logger.debug('ProjectsService: listing projects, force refresh', forceRefresh);
              return DataService.list(projectsVersion, {}).then(function(projectData) {
                cachedProjectData = projectData;
                return projectData;
              }, function(error) {
                // If the request fails, don't try to list projects again without `forceRefresh`.
                cachedProjectData = DataService.createData([]);
                cachedProjectDataIncomplete = true;
                return $q.reject();
              });
            }
docs: List the projects the user has access to. This method returns cached data if the projects had previously been fetched to avoid requesting them again and again, which is a problem for admins who might have hundreds or more.