Skip to content

Commit

Permalink
Apply scr. policy actions from deleted assignments
Browse files Browse the repository at this point in the history
These actions were originally applied only when originating from
zero and plus assignments sets. But we need to execute scripts also
on assignment deletion.
  • Loading branch information
mederly committed Nov 14, 2019
1 parent 6044b24 commit 99b34ce
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -58,7 +58,8 @@ public <O extends ObjectType> void execute(@NotNull ModelContext<O> context, Tas
}
DeltaSetTriple<EvaluatedAssignmentImpl<?>> triple = ((LensContext<?>) context).getEvaluatedAssignmentTriple();
if (triple != null) {
for (EvaluatedAssignment<?> assignment : triple.getNonNegativeValues()) {
// We need to apply rules from all the assignments - even those that were deleted.
for (EvaluatedAssignment<?> assignment : triple.getAllValues()) {
for (EvaluatedPolicyRule rule : assignment.getAllTargetsPolicyRules()) {
executeRuleScriptingActions(rule, context, task, result);
}
Expand Down

0 comments on commit 99b34ce

Please sign in to comment.