Skip to content

Commit

Permalink
feat: add tenant exclude for operator API (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras authored Jan 27, 2024
1 parent bf0d6e8 commit 2fc6bdf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.github.onecx</groupId>
<artifactId>onecx-quarkus3-parent</artifactId>
<version>0.26.0</version>
<version>0.29.0</version>
</parent>

<artifactId>onecx-permission-svc</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,6 +36,7 @@ public class OperatorRestController implements PermissionOperatorApi {
ExceptionMapper exceptionMapper;

@Override
@TenantExclude
@Transactional(Transactional.TxType.REQUIRED)
public Response createOrUpdatePermission(String appId, PermissionRequestDTOV1 permissionRequestDTOV1) {

Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# DEFAULT
quarkus.datasource.db-kind=postgresql
quarkus.datasource.jdbc.max-size=30
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2fc6bdf

Please sign in to comment.