public IEnumerable <Collaborator> GetCollaborators(long id) { _logger.LogDebug(2, "Getting collaborators"); var project = _projectRepository.Find(id); var userId = _userManager.GetUserId(HttpContext.User); if (_projectRepository.UserHasAccess(project.Id, userId)) { return(_collaboratorRepository.FindForProject(project.Id)); } return(new List <Collaborator>()); }