From 26fb156318ef00253388fb0c97c236279d7ca727 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Wed, 2 Oct 2024 20:56:09 +0200 Subject: [PATCH] remove not needed parameter from private method --- .../QuestionnaireResponseAuthorizationRule.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dsf-fhir/dsf-fhir-server/src/main/java/dev/dsf/fhir/authorization/QuestionnaireResponseAuthorizationRule.java b/dsf-fhir/dsf-fhir-server/src/main/java/dev/dsf/fhir/authorization/QuestionnaireResponseAuthorizationRule.java index ef86fe655..a47fb36c4 100644 --- a/dsf-fhir/dsf-fhir-server/src/main/java/dev/dsf/fhir/authorization/QuestionnaireResponseAuthorizationRule.java +++ b/dsf-fhir/dsf-fhir-server/src/main/java/dev/dsf/fhir/authorization/QuestionnaireResponseAuthorizationRule.java @@ -48,8 +48,7 @@ public Optional reasonCreateAllowed(Connection connection, Identity iden { if (identity.isLocalIdentity() && identity.hasDsfRole(FhirServerRole.CREATE)) { - Optional errors = newResourceOk(connection, newResource, - EnumSet.of(QuestionnaireResponseStatus.INPROGRESS)); + Optional errors = newResourceOk(newResource, EnumSet.of(QuestionnaireResponseStatus.INPROGRESS)); if (errors.isEmpty()) { // TODO implement unique criteria based on UserTask.id when implemented as identifier @@ -69,7 +68,7 @@ public Optional reasonCreateAllowed(Connection connection, Identity iden } } - private Optional newResourceOk(Connection connection, QuestionnaireResponse newResource, + private Optional newResourceOk(QuestionnaireResponse newResource, EnumSet allowedStatus) { List errors = new ArrayList<>(); @@ -166,7 +165,7 @@ public Optional reasonUpdateAllowed(Connection connection, Identity iden { if (identity.isLocalIdentity() && identity.hasDsfRole(FhirServerRole.UPDATE)) { - Optional errors = newResourceOk(connection, newResource, + Optional errors = newResourceOk(newResource, EnumSet.of(QuestionnaireResponseStatus.COMPLETED, QuestionnaireResponseStatus.STOPPED)); if (errors.isEmpty()) {