Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tenant exclude for operator API #7

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading