From dff2ea1ac73d1c143446131ab4bbc48e0266de11 Mon Sep 17 00:00:00 2001 From: timparsons Date: Thu, 4 May 2023 10:45:43 -0400 Subject: [PATCH 1/3] [BI-1779] Removing ability to enable/disable system breeding methods for a program --- .../api/v1/controller/BreedingMethodController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/breedinginsight/api/v1/controller/BreedingMethodController.java b/src/main/java/org/breedinginsight/api/v1/controller/BreedingMethodController.java index 5ef7caa75..6e89bd7cd 100644 --- a/src/main/java/org/breedinginsight/api/v1/controller/BreedingMethodController.java +++ b/src/main/java/org/breedinginsight/api/v1/controller/BreedingMethodController.java @@ -135,7 +135,9 @@ public HttpResponse> updateProgramBreeding } @Put("programs/{programId}/breeding-methods/enable") - @ProgramSecured(roles = {ProgramSecuredRole.BREEDER}) +// BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated +// @ProgramSecured(roles = {ProgramSecuredRole.BREEDER}) + @Secured(SecurityRule.DENY_ALL) public HttpResponse enableSystemBreedingMethods(@PathVariable UUID programId, @Body List systemBreedingMethodIds) throws ApiException, BadRequestException { log.debug("enabling system breeding methods for program: "+programId); From 54c3812027244db22cfc6f6d00ca88ee75b18530 Mon Sep 17 00:00:00 2001 From: timparsons Date: Thu, 4 May 2023 10:51:35 -0400 Subject: [PATCH 2/3] [BI-1779] Disabling system breeding method unit tests --- .../v1/controller/BreedingMethodControllerIntegrationTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java b/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java index ed84a3fa2..0f72bb15b 100644 --- a/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java +++ b/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java @@ -33,6 +33,7 @@ import org.breedinginsight.model.User; import org.breedinginsight.utilities.Utilities; import org.jooq.DSLContext; +import org.junit.Ignore; import org.junit.jupiter.api.*; import javax.inject.Inject; @@ -160,6 +161,7 @@ public void fetchMethodsForNewProgram() { .collect(Collectors.toList()))); } + @Ignore //BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated @Test public void enableSystemMethods() { Program program = createProgram("enableProgramBM", "EBM", "ENBM"); @@ -498,6 +500,7 @@ public void tryDeleteProgramMethodInUse() throws ApiException { assertThat(programMethods.stream().map(ProgramBreedingMethodEntity::getId).collect(Collectors.toList()), hasItem(createdMethod.getId())); } + @Ignore //BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated @Test public void tryDisableSystemMethodInUse() { Program program = createProgram("tryDeleteSystemBM", "TDSBM", "TRDSBM"); From 91414fb900b1df5ea155aa12d8b1f7c1ddc64d6f Mon Sep 17 00:00:00 2001 From: timparsons Date: Thu, 4 May 2023 11:52:04 -0400 Subject: [PATCH 3/3] [BI-1779] Changing annotation used to disable tests --- .../controller/BreedingMethodControllerIntegrationTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java b/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java index 0f72bb15b..0cf098c04 100644 --- a/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java +++ b/src/test/java/org/breedinginsight/api/v1/controller/BreedingMethodControllerIntegrationTest.java @@ -33,7 +33,6 @@ import org.breedinginsight.model.User; import org.breedinginsight.utilities.Utilities; import org.jooq.DSLContext; -import org.junit.Ignore; import org.junit.jupiter.api.*; import javax.inject.Inject; @@ -161,7 +160,7 @@ public void fetchMethodsForNewProgram() { .collect(Collectors.toList()))); } - @Ignore //BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated + @Disabled //BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated @Test public void enableSystemMethods() { Program program = createProgram("enableProgramBM", "EBM", "ENBM"); @@ -500,7 +499,7 @@ public void tryDeleteProgramMethodInUse() throws ApiException { assertThat(programMethods.stream().map(ProgramBreedingMethodEntity::getId).collect(Collectors.toList()), hasItem(createdMethod.getId())); } - @Ignore //BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated + @Disabled //BI-1779 - Removing the ability to choose predefined methods for a program until we make the germplasm import template dynamically generated @Test public void tryDisableSystemMethodInUse() { Program program = createProgram("tryDeleteSystemBM", "TDSBM", "TRDSBM");