This commit is contained in:
CITE\spapacharalampous 2024-08-26 16:17:50 +03:00
parent 1a022a8363
commit 252d712d2a
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.opencdmp.audit.AuditableAction; import org.opencdmp.audit.AuditableAction;
import org.opencdmp.authorization.AuthorizationFlags; import org.opencdmp.authorization.AuthorizationFlags;
import org.opencdmp.commons.enums.IsActive;
import org.opencdmp.commons.scope.tenant.TenantScope; import org.opencdmp.commons.scope.tenant.TenantScope;
import org.opencdmp.controllers.swagger.SwaggerHelpers; import org.opencdmp.controllers.swagger.SwaggerHelpers;
import org.opencdmp.controllers.swagger.annotation.OperationWithTenantHeader; import org.opencdmp.controllers.swagger.annotation.OperationWithTenantHeader;
@ -149,7 +150,7 @@ public class DescriptionWorkflowController {
this.censorFactory.censor(DescriptionWorkflowCensor.class).censor(fieldSet, null); this.censorFactory.censor(DescriptionWorkflowCensor.class).censor(fieldSet, null);
DescriptionWorkflowQuery query = this.queryFactory.query(DescriptionWorkflowQuery.class).authorize(AuthorizationFlags.AllExceptPublic); DescriptionWorkflowQuery query = this.queryFactory.query(DescriptionWorkflowQuery.class).authorize(AuthorizationFlags.AllExceptPublic).isActives(IsActive.Active);
if (this.tenantScope.isDefaultTenant()) if (this.tenantScope.isDefaultTenant())
query = query.defaultTenant(true); query = query.defaultTenant(true);

View File

@ -20,6 +20,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
import jakarta.xml.bind.JAXBException; import jakarta.xml.bind.JAXBException;
import org.opencdmp.audit.AuditableAction; import org.opencdmp.audit.AuditableAction;
import org.opencdmp.authorization.AuthorizationFlags; import org.opencdmp.authorization.AuthorizationFlags;
import org.opencdmp.commons.enums.IsActive;
import org.opencdmp.commons.scope.tenant.TenantScope; import org.opencdmp.commons.scope.tenant.TenantScope;
import org.opencdmp.controllers.swagger.SwaggerHelpers; import org.opencdmp.controllers.swagger.SwaggerHelpers;
import org.opencdmp.controllers.swagger.annotation.OperationWithTenantHeader; import org.opencdmp.controllers.swagger.annotation.OperationWithTenantHeader;
@ -163,7 +164,7 @@ public class PlanWorkflowController {
this.censorFactory.censor(PlanWorkflowCensor.class).censor(fieldSet, null); this.censorFactory.censor(PlanWorkflowCensor.class).censor(fieldSet, null);
PlanWorkflowQuery query = this.queryFactory.query(PlanWorkflowQuery.class).disableTracking().authorize(AuthorizationFlags.AllExceptPublic); PlanWorkflowQuery query = this.queryFactory.query(PlanWorkflowQuery.class).disableTracking().authorize(AuthorizationFlags.AllExceptPublic).isActives(IsActive.Active);
if (this.tenantScope.isDefaultTenant()) if (this.tenantScope.isDefaultTenant())
query = query.defaultTenant(true); query = query.defaultTenant(true);