import org.sonar.server.platform.db.migration.step.MassUpdate;
public class PopulateReportSubscriptions extends DataChange {
- // TODO should we add a inner join on users to not transfer values of non-existent users?
+
private static final String SELECT_QUERY = """
SELECT port.uuid as portfolioUuid, pb.uuid as branchUuid, p.user_uuid as userUuid
FROM properties p
@Override
public <T extends EntityDto> List<T> keepAuthorizedEntities(String permission, Collection<T> projects) {
Set<String> projectsUuids = projects.stream().map(EntityDto::getUuid).collect(Collectors.toSet());
- // TODO
+ // TODO in SONAR-19445
Set<String> authorizedProjectsUuids = keepProjectsUuidsByPermission(permission, projectsUuids);
return projects.stream()
dbClient.portfolioDao().insert(dbSession, portfolioDto);
}
- // TODO permissions: probably we want to apply it to the projectDto or portfolioDto
+ // TODO SONAR-19445: probably we want to apply it to the projectDto or portfolioDto
permissionTemplateService.applyDefaultToNewComponent(dbSession, componentDto, userUuid);
return new ComponentCreationData(componentDto, mainBranch, projectDto);
}
- // TODO, when working on permissions, maybe we could remove the last argument from this method
+ // TODO SONAR-19445, when working on permissions, maybe we could remove the last argument from this method
private void addToFavourites(DbSession dbSession, ProjectDto projectDto, @Nullable String userUuid, @Nullable String userLogin, ComponentDto componentDto) {
if (permissionTemplateService.hasDefaultTemplateWithPermissionOnProjectCreator(dbSession, componentDto)) {
favoriteUpdater.add(dbSession, projectDto, userUuid, userLogin, false);