[midPoint-git] [Evolveum/midpoint] ec6ae8: Fix assignment-related approvals

mederly noreply at github.com
Thu Oct 28 22:38:39 CEST 2021


  Branch: refs/heads/support-4.0
  Home:   https://github.com/Evolveum/midpoint
  Commit: ec6ae837da9f81401d49763074818a7c2f714e75
      https://github.com/Evolveum/midpoint/commit/ec6ae837da9f81401d49763074818a7c2f714e75
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2021-10-28 (Thu, 28 Oct 2021)

  Changed paths:
    A infra/prism-api/src/main/java/com/evolveum/midpoint/prism/delta/AddDeleteReplace.java
    M infra/prism-api/src/main/java/com/evolveum/midpoint/prism/xml/XmlTypeConverter.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/PolicyRuleTypeUtil.java
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/context/EvaluatedAssignment.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedAssignmentImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedPolicyRuleImpl.java
    A model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/AssignmentOrigin.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/SmartAssignmentCollection.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/SmartAssignmentElement.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/AssignmentTripleEvaluator.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/PolicyRuleProcessor.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/evaluators/AssignmentModificationConstraintEvaluator.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/evaluators/ExclusionConstraintEvaluator.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/evaluators/MultiplicityConstraintEvaluator.java
    M model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/lens/TestPolicyRules2.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestMultiResource.java
    M model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java
    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/assignments/TestAssignmentsAdvanced.java
    A model/workflow-impl/src/test/resources/assignments-advanced/role-being-disabled.xml
    A model/workflow-impl/src/test/resources/assignments-advanced/role-being-enabled.xml
    A model/workflow-impl/src/test/resources/assignments-advanced/user-approver-of-role-being-disabled.xml
    A model/workflow-impl/src/test/resources/assignments-advanced/user-approver-of-role-being-enabled.xml
    A model/workflow-impl/src/test/resources/assignments-advanced/user-holder-of-role-being-disabled.xml
    A model/workflow-impl/src/test/resources/assignments-advanced/user-holder-of-role-being-enabled.xml

  Log Message:
  -----------
  Fix assignment-related approvals

Assignment-related policy rules in 4.0 have relied on assignment
being present in plus/zero/minus set. This is wrong, as the
placement in these sets depends on other factors,
e.g. on assignment validity.

This behavior has been fixed in midPoint 4.2 (as part of midPrivacy).

So, here we backport relevant parts of the new code: AssignmentOrigin,
SmartAssignmentCollection, and SmartAssignmentElement, plus a couple
of other ones.

The overall idea is to change policy rules processing ONLY, but do not
touch (fix) placement of assignments in their sets. (This is because fixing
the placement would need many subsequent fixes to be brought from 4.2
to here.)

In addition to that, we have fixed default approval behavior when
no policy rules are present: using "is added" instead of "is in plus set".
See 1e43c8971762b3826d81545b3ca21ff853a05e03 for the same fix
on master.

Other changes:
- Assignment pruning is now based on "being added" instead of on
"in plus set".
- Fixed displaying of policy rule actions in PolicyRuleTypeUtil.

This resolves MID-7317.




More information about the midPoint-svn mailing list