not every fforesight application needs mongo ...

This commit is contained in:
Timo Bejan 2024-04-05 18:46:39 +03:00
parent 9bdd2bb09a
commit cd159879f5

View File

@ -25,6 +25,7 @@ import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.representations.idm.RoleRepresentation;
import org.keycloak.representations.idm.RolesRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
@ -185,9 +186,12 @@ public class TenantManagementService implements TenantProvider {
log.info("Created schema for tenant: {}", tenantRequest.getTenantId());
if (tenantRequest.getMongoDBConnection() != null) {
createMongoDBDatabase(tenantRequest);
log.info("Created mongodb database for tenant: {}", tenantRequest.getTenantId());
} else {
log.info("Skipping creation of mongo database for this tenant");
}
propagateTenantToKeyCloak(tenantRequest.getTenantId(), tenantRequest.getDefaultUsers());