-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix default "assignment added" approval processing
The default approval processing of assignment being added was flawed, because it considered an assignment whose validity state changed (from invalid to valid) as being added. This is obviously wrong: such assignment is being modified, not added. This resolves MID-7317.
- Loading branch information
Showing
10 changed files
with
232 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
model/workflow-impl/src/test/resources/assignments-advanced/role-being-disabled.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- | ||
~ Copyright (C) 2010-2021 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
oid="4835efdc-6fee-438b-bb09-fd428a200dbb"> | ||
<name>role-being-disabled</name> | ||
<assignment> | ||
<policyRule> | ||
<policyConstraints> | ||
<assignment> | ||
<operation>delete</operation> | ||
<relation>default</relation> | ||
</assignment> | ||
</policyConstraints> | ||
<policyActions> | ||
<approval> | ||
<approverRelation>approver</approverRelation> | ||
</approval> | ||
</policyActions> | ||
</policyRule> | ||
</assignment> | ||
</role> |
10 changes: 10 additions & 0 deletions
10
model/workflow-impl/src/test/resources/assignments-advanced/role-being-enabled.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- | ||
~ Copyright (C) 2010-2021 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
oid="4fcf187a-09b7-4d32-b998-9cd978195a82"> | ||
<name>role-being-enabled</name> | ||
</role> |
15 changes: 15 additions & 0 deletions
15
...low-impl/src/test/resources/assignments-advanced/user-approver-of-role-being-disabled.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- | ||
~ Copyright (C) 2010-2021 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" | ||
oid="d4b1fa25-4436-4f0c-a2a1-727a536b60e3"> | ||
<name>approver-of-role-being-disabled</name> | ||
<assignment> | ||
<targetRef oid="4835efdc-6fee-438b-bb09-fd428a200dbb" type="RoleType" relation="org:approver"/> | ||
</assignment> | ||
</user> |
15 changes: 15 additions & 0 deletions
15
...flow-impl/src/test/resources/assignments-advanced/user-approver-of-role-being-enabled.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- | ||
~ Copyright (C) 2010-2021 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" | ||
oid="39764050-fbd8-4746-a8a6-cb9141ae31ae"> | ||
<name>approver-of-role-being-enabled</name> | ||
<assignment> | ||
<targetRef oid="4fcf187a-09b7-4d32-b998-9cd978195a82" type="RoleType" relation="org:approver"/> | ||
</assignment> | ||
</user> |
14 changes: 14 additions & 0 deletions
14
...kflow-impl/src/test/resources/assignments-advanced/user-holder-of-role-being-disabled.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- | ||
~ Copyright (C) 2010-2021 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
oid="586fc857-71d8-4906-a61d-46ba7941be00"> | ||
<name>holder-of-role-being-disabled</name> | ||
<assignment> | ||
<targetRef oid="4835efdc-6fee-438b-bb09-fd428a200dbb" type="RoleType"/> | ||
</assignment> | ||
</user> |
17 changes: 17 additions & 0 deletions
17
...rkflow-impl/src/test/resources/assignments-advanced/user-holder-of-role-being-enabled.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- | ||
~ Copyright (C) 2010-2021 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
oid="c6f7ddbe-a596-4a53-8acf-e03282f3da33"> | ||
<name>holder-of-role-being-enabled</name> | ||
<assignment> | ||
<targetRef oid="4fcf187a-09b7-4d32-b998-9cd978195a82" type="RoleType"/> | ||
<activation> | ||
<validTo>1900-01-01T00:00:00+00:00</validTo> | ||
</activation> | ||
</assignment> | ||
</user> |