diff --git a/avni-server-api/src/main/java/org/avni/server/service/metabase/MetabaseService.java b/avni-server-api/src/main/java/org/avni/server/service/metabase/MetabaseService.java index 7cbba2af9..1a0306f2c 100644 --- a/avni-server-api/src/main/java/org/avni/server/service/metabase/MetabaseService.java +++ b/avni-server-api/src/main/java/org/avni/server/service/metabase/MetabaseService.java @@ -14,7 +14,7 @@ @Service public class MetabaseService { - @Value("${avni.org.password}") + @Value("${avni.default.org.user.db.password}") private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD; public static final String DB_ENGINE = "postgres"; private final OrganisationService organisationService; diff --git a/avni-server-api/src/main/java/org/avni/server/web/OrganisationController.java b/avni-server-api/src/main/java/org/avni/server/web/OrganisationController.java index b90119b01..68785330a 100644 --- a/avni-server-api/src/main/java/org/avni/server/web/OrganisationController.java +++ b/avni-server-api/src/main/java/org/avni/server/web/OrganisationController.java @@ -30,7 +30,7 @@ public class OrganisationController implements RestControllerResourceProcessor { - @Value("${avni.org.password}") + @Value("${avni.default.org.user.db.password}") private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD; private final Logger logger; private final OrganisationGroupRepository organisationGroupRepository; diff --git a/avni-server-api/src/main/resources/application.properties b/avni-server-api/src/main/resources/application.properties index 00bdfce5c..eafa6ce6d 100644 --- a/avni-server-api/src/main/resources/application.properties +++ b/avni-server-api/src/main/resources/application.properties @@ -168,4 +168,4 @@ metabase.api.key=${METABASE_API_KEY:mb_uhFRMqCSre4v/hTZTsQcMnh8k2GCZFX2tGmSBdoxN avni.endpoints.endOfLife.1=${AVNI_ENDPOINT_END_OF_LIFE_1:2024-09-05} #default org configuration -avni.org.password=${AVNI_ORG_PASSWORD:password} \ No newline at end of file +avni.default.org.user.db.password=${AVNI_DEFAULT_ORG_USER_DB_PASSWORD:password} \ No newline at end of file diff --git a/avni-server-api/src/test/java/org/avni/server/service/builder/TestOrganisationService.java b/avni-server-api/src/test/java/org/avni/server/service/builder/TestOrganisationService.java index 702ce6e11..d91b9eae3 100644 --- a/avni-server-api/src/test/java/org/avni/server/service/builder/TestOrganisationService.java +++ b/avni-server-api/src/test/java/org/avni/server/service/builder/TestOrganisationService.java @@ -18,8 +18,8 @@ public class TestOrganisationService { private final UserRepository userRepository; private final TestWebContextService testWebContextService; private final OrganisationService organisationService; - @Value("${avni.org.password}") - private String DEFAUT_PASSWORD; + @Value("${avni.default.org.user.db.password}") + private String AVNI_DEFAULT_ORG_USER_DB_PASSWORD; @Autowired public TestOrganisationService(ImplementationRepository implementationRepository, OrganisationRepository organisationRepository, UserRepository userRepository, TestWebContextService testWebContextService, OrganisationService organisationService) { @@ -33,7 +33,7 @@ public TestOrganisationService(ImplementationRepository implementationRepository public void createOrganisation(Organisation organisation, User adminUser) { organisationRepository.save(organisation); User orgUser = createUser(organisation, adminUser); - implementationRepository.createDBUser(organisation.getDbUser(),DEFAUT_PASSWORD); + implementationRepository.createDBUser(organisation.getDbUser(),AVNI_DEFAULT_ORG_USER_DB_PASSWORD); testWebContextService.setUser(orgUser); organisationService.setupBaseOrganisationMetadata(organisation); } diff --git a/avni-server-api/src/test/resources/application.properties b/avni-server-api/src/test/resources/application.properties index eb7831e9e..b5c09903f 100644 --- a/avni-server-api/src/test/resources/application.properties +++ b/avni-server-api/src/test/resources/application.properties @@ -130,4 +130,4 @@ metabase.api.key=${METABASE_API_KEY:mb_hwsYP2sFN7fvwM5LTS4d/tnIqA5SeHUxwUhm2KAI1 avni.endpoints.endOfLife.1=2024-09-09 #default org configuration -avni.org.password=${AVNI_ORG_PASSWORD:password} \ No newline at end of file +avni.default.org.user.db.password=${AVNI_DEFAULT_ORG_USER_DB_PASSWORD:password} \ No newline at end of file