From d711de06319ddd6ef99d36d7a4a270e0accc0eef Mon Sep 17 00:00:00 2001 From: Andrej Petras Date: Sat, 27 Jan 2024 11:35:19 +0100 Subject: [PATCH] feat: add tenant exclude for operator API --- pom.xml | 2 +- .../operator/v1/controllers/OperatorRestController.java | 2 ++ src/main/resources/application.properties | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index dc0b029..30b8860 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ io.github.onecx onecx-quarkus3-parent - 0.26.0 + 0.29.0 onecx-permission-svc diff --git a/src/main/java/io/github/onecx/permission/rs/operator/v1/controllers/OperatorRestController.java b/src/main/java/io/github/onecx/permission/rs/operator/v1/controllers/OperatorRestController.java index 910a733..bf2d9d4 100644 --- a/src/main/java/io/github/onecx/permission/rs/operator/v1/controllers/OperatorRestController.java +++ b/src/main/java/io/github/onecx/permission/rs/operator/v1/controllers/OperatorRestController.java @@ -12,6 +12,7 @@ import org.jboss.resteasy.reactive.server.ServerExceptionMapper; import org.tkit.quarkus.jpa.exceptions.ConstraintException; import org.tkit.quarkus.log.cdi.LogService; +import org.tkit.quarkus.rs.context.tenant.TenantExclude; import gen.io.github.onecx.permission.rs.operator.v1.PermissionOperatorApi; import gen.io.github.onecx.permission.rs.operator.v1.model.PermissionRequestDTOV1; @@ -35,6 +36,7 @@ public class OperatorRestController implements PermissionOperatorApi { ExceptionMapper exceptionMapper; @Override + @TenantExclude @Transactional(Transactional.TxType.REQUIRED) public Response createOrUpdatePermission(String appId, PermissionRequestDTOV1 permissionRequestDTOV1) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 75af060..88c3dd1 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,4 @@ + # DEFAULT quarkus.datasource.db-kind=postgresql quarkus.datasource.jdbc.max-size=30 @@ -30,10 +31,10 @@ tkit.dataimport.configurations.permission.stop-at-error=true # DEV %dev.onecx.permission.token.verified=false -%dev.tkit.rs.context.tenant-id.enabled=true -%dev.tkit.rs.context.tenant-id.mock.enabled=true -%dev.tkit.rs.context.tenant-id.mock.default-tenant=test -%dev.tkit.rs.context.tenant-id.mock.data.org1=tenant100 +#%dev.tkit.rs.context.tenant-id.enabled=true +#%dev.tkit.rs.context.tenant-id.mock.enabled=true +#%dev.tkit.rs.context.tenant-id.mock.default-tenant=test +#%dev.tkit.rs.context.tenant-id.mock.data.org1=tenant100 # TEST quarkus.test.integration-test-profile=test