[midPoint-git] [Evolveum/midpoint] d15762: Fix NPE with policy constraint on focus deletion

mederly noreply at github.com
Tue Apr 26 17:16:20 CEST 2022


  Branch: refs/heads/support-4.4
  Home:   https://github.com/Evolveum/midpoint
  Commit: d15762a804e1ec6013125d783df775dd9bffc958
      https://github.com/Evolveum/midpoint/commit/d15762a804e1ec6013125d783df775dd9bffc958
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2022-04-26 (Tue, 26 Apr 2022)

  Changed paths:
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedPolicyRuleImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/FocusLifecycleProcessor.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/AssignmentPolicyRuleEvaluationContext.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/ObjectPolicyRuleEvaluationContext.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/PolicyRuleEvaluationContext.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/PolicyRuleProcessor.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/evaluators/ConstraintEvaluatorHelper.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/util/ModelImplUtils.java
    M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/NotificationExpressionHelper.java
    M model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/other/TestMiscellaneous.java
    A model/workflow-impl/src/test/resources/miscellaneous/role-test370.xml
    A model/workflow-impl/src/test/resources/miscellaneous/user-test370.xml

  Log Message:
  -----------
  Fix NPE with policy constraint on focus deletion

When a policy constraint with custom presentation (message)
was evaluated during focus deletion operation, a NPE was thrown.

This commit fixes that, and reviews other similar places where
such exceptions could occur.

This resolves MID-7908.

(cherry picked from commit 4bd3847f6c9e320c96142d629d03b01808eb18b9)


  Commit: 235f538663d25979c73ac0679b1b937b880d1083
      https://github.com/Evolveum/midpoint/commit/235f538663d25979c73ac0679b1b937b880d1083
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2022-04-26 (Tue, 26 Apr 2022)

  Changed paths:
    M model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/policy/AssignmentPolicyAspectPart.java
    M model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/other/TestMiscellaneous.java
    A model/workflow-impl/src/test/resources/miscellaneous/role-test380.xml
    A model/workflow-impl/src/test/resources/miscellaneous/user-test380.xml

  Log Message:
  -----------
  Skip assignment approvals on focus deletion

When a focus is going to be deleted, assignment-level approvals
are simply skipped. There's no point in approving these changes,
as it is not clear what should be done in the case of their
rejection. In the need of focus deletion approvals, please use
appropriate policy constraints (referring to object deletion).

Resolves MID-7912.

(cherry picked from commit 43e0eb54de4e4688f5a3f6967067823369084777)


Compare: https://github.com/Evolveum/midpoint/compare/93b9a4dce5bb...235f538663d2


More information about the midPoint-svn mailing list