From b7bd667486353a7697674a98866a256fcf5b0cea Mon Sep 17 00:00:00 2001 From: "CITE\\amentis" Date: Mon, 14 Oct 2024 17:56:12 +0300 Subject: [PATCH] status workflow auth fixes --- .../model/builder/description/DescriptionBuilder.java | 6 +++--- .../descriptionstatus/DescriptionStatusServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/core/src/main/java/org/opencdmp/model/builder/description/DescriptionBuilder.java b/backend/core/src/main/java/org/opencdmp/model/builder/description/DescriptionBuilder.java index c2e209f43..bdff97fa6 100644 --- a/backend/core/src/main/java/org/opencdmp/model/builder/description/DescriptionBuilder.java +++ b/backend/core/src/main/java/org/opencdmp/model/builder/description/DescriptionBuilder.java @@ -32,9 +32,9 @@ import org.opencdmp.model.builder.plan.PlanBuilder; import org.opencdmp.model.description.Description; import org.opencdmp.model.descriptionreference.DescriptionReference; import org.opencdmp.model.descriptionstatus.DescriptionStatus; +import org.opencdmp.model.descriptionstatus.DescriptionStatusDefinitionAuthorization; import org.opencdmp.model.descriptiontemplate.DescriptionTemplate; import org.opencdmp.model.plan.Plan; -import org.opencdmp.model.planstatus.PlanStatusDefinitionAuthorization; import org.opencdmp.model.user.User; import org.opencdmp.query.*; import org.opencdmp.service.custompolicy.CustomPolicyService; @@ -394,9 +394,9 @@ public class DescriptionBuilder extends BaseBuilder statusEntities = this.queryFactory.query(DescriptionStatusQuery.class).isActive(IsActive.Active).collectAs(new BaseFieldSet().ensure(DescriptionStatus._id)); for (DescriptionEntity description: descriptionEntities) { authorizedStatusMap.put(description.getId(), new ArrayList<>()); - AffiliatedResource affiliatedResource = this.authorizationContentResolver.planAffiliation(description.getPlanId()); + AffiliatedResource affiliatedResource = this.authorizationContentResolver.descriptionAffiliation(description.getId()); for (DescriptionStatusEntity status: statusEntities) { List availableTransitions = definition.getStatusTransitions().stream().filter(x -> x.getFromStatusId().equals(description.getStatusId())).collect(Collectors.toList());