You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/10/06 13:23:12 UTC

[2/2] syncope git commit: User status update working with key or username (as commodity)

User status update working with key or username (as commodity)


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/336fe415
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/336fe415
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/336fe415

Branch: refs/heads/master
Commit: 336fe415c1e78f42da77bb6eb1cf3b362c6d8cae
Parents: e6eb802
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Thu Oct 6 15:22:42 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Thu Oct 6 15:22:58 2016 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/syncope/core/logic/UserLogic.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/336fe415/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
index 895b958..3273759 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/UserLogic.java
@@ -267,6 +267,9 @@ public class UserLogic extends AbstractAnyLogic<UserTO, UserPatch> {
                 toUpdate.getRealm());
         securityChecks(effectiveRealms, toUpdate.getRealm(), toUpdate.getKey());
 
+        // ensures the actual user key is effectively on the patch - as the binder.getUserTO(statusPatch.getKey())
+        // call above works with username as well
+        statusPatch.setKey(toUpdate.getKey());
         Pair<String, List<PropagationStatus>> updated = setStatusOnWfAdapter(statusPatch, nullPriorityAsync);
 
         return after(