-
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 create/modifyTaskRef in MetadataType
When storing task references in MetadataType we now always store a reference to the root task there. All subtasks are (in most cases) transient, and storing their OIDs for future reference makes almost no sense. This resolves MID-7179.
- Loading branch information
Showing
6 changed files
with
162 additions
and
12 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
53 changes: 53 additions & 0 deletions
53
model/model-intest/src/test/resources/password/task-change-jack-account-password.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,53 @@ | ||
<!-- | ||
~ 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. | ||
--> | ||
|
||
<task xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" | ||
xmlns:s="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3" | ||
oid="442f8d91-4f1c-4651-b6c6-65b5aa3ab1d4"> | ||
<name>change-account-password</name> | ||
<ownerRef oid="00000000-0000-0000-0000-000000000002" type="UserType"/> | ||
<executionStatus>runnable</executionStatus> | ||
<activity> | ||
<work> | ||
<iterativeScripting> | ||
<objects> | ||
<type>ShadowType</type> | ||
<query> | ||
<q:filter> | ||
<q:equal> | ||
<q:path>name</q:path> | ||
<q:value>jack</q:value> | ||
</q:equal> | ||
</q:filter> | ||
</query> | ||
<useRepositoryDirectly>true</useRepositoryDirectly> | ||
</objects> | ||
<scriptExecutionRequest> | ||
<s:execute> | ||
<s:script> | ||
<code> | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.* | ||
import com.evolveum.prism.xml.ns._public.types_3.* | ||
|
||
delta = midpoint.deltaFor(ShadowType.class) | ||
.item(ShadowType.F_CREDENTIALS, CredentialsType.F_PASSWORD, PasswordType.F_VALUE) | ||
.replace(ProtectedStringType.fromClearValue('wh3r3sTheRum!!')) | ||
.asObjectDelta(input.oid) | ||
|
||
midpoint.executeChanges(delta) | ||
</code> | ||
</s:script> | ||
</s:execute> | ||
</scriptExecutionRequest> | ||
</iterativeScripting> | ||
</work> | ||
<distribution> | ||
<workerThreads>2</workerThreads> | ||
</distribution> | ||
</activity> | ||
</task> |
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