[
https://issues.apache.org/jira/browse/SYNCOPE-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672840#comment-16672840
]
ASF GitHub Bot commented on SYNCOPE-1390:
-----------------------------------------
ilgrosso closed pull request #86: SYNCOPE-1390: Pull Realms: pull task with
Unmatching Rules: PROVISION…
URL: https://github.com/apache/syncope/pull/86
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultRealmPullResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultRealmPullResultHandler.java
index fb29bd4684..2f0fd19f9c 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultRealmPullResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultRealmPullResultHandler.java
@@ -31,7 +31,6 @@
import org.apache.syncope.common.lib.types.AuditElements.Result;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.MatchingRule;
-import org.apache.syncope.core.provisioning.api.PropagationByResource;
import org.apache.syncope.common.lib.types.PullMode;
import org.apache.syncope.common.lib.types.ResourceOperation;
import org.apache.syncope.common.lib.types.UnmatchingRule;
@@ -42,6 +41,7 @@
import org.apache.syncope.core.persistence.api.entity.Realm;
import org.apache.syncope.core.persistence.api.entity.resource.OrgUnit;
import org.apache.syncope.core.persistence.api.entity.task.PullTask;
+import org.apache.syncope.core.provisioning.api.PropagationByResource;
import
org.apache.syncope.core.provisioning.api.propagation.PropagationException;
import
org.apache.syncope.core.provisioning.api.pushpull.IgnoreProvisionException;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningReport;
@@ -160,7 +160,7 @@ public boolean handle(final SyncDelta delta) {
action.beforeAssign(profile, delta, realmTO);
}
- create(realmTO, delta,
UnmatchingRule.toEventName(UnmatchingRule.ASSIGN), result);
+ create(realmTO, delta, UnmatchingRule.ASSIGN, result);
}
return Collections.singletonList(result);
@@ -198,7 +198,7 @@ public boolean handle(final SyncDelta delta) {
action.beforeProvision(profile, delta, realmTO);
}
- create(realmTO, delta,
UnmatchingRule.toEventName(UnmatchingRule.PROVISION), result);
+ create(realmTO, delta, UnmatchingRule.PROVISION, result);
}
return Collections.singletonList(result);
@@ -225,7 +225,7 @@ private void throwIgnoreProvisionException(final SyncDelta
delta, final Exceptio
private void create(
final RealmTO realmTO,
final SyncDelta delta,
- final String operation,
+ final UnmatchingRule unmatchingRule,
final ProvisioningReport result)
throws JobExecutionException {
@@ -239,8 +239,10 @@ private void create(
for (String resource : realm.getResourceKeys()) {
propByRes.add(ResourceOperation.CREATE, resource);
}
- List<PropagationTaskTO> tasks =
propagationManager.createTasks(realm, propByRes, null);
- taskExecutor.execute(tasks, false);
+ if (unmatchingRule == UnmatchingRule.ASSIGN) {
+ List<PropagationTaskTO> tasks =
propagationManager.createTasks(realm, propByRes, null);
+ taskExecutor.execute(tasks, false);
+ }
RealmTO actual = binder.getRealmTO(realm, true);
@@ -271,7 +273,7 @@ private void create(
resultStatus = Result.FAILURE;
}
- finalize(operation, resultStatus, null, output, delta);
+ finalize(UnmatchingRule.toEventName(unmatchingRule), resultStatus,
null, output, delta);
}
private List<ProvisioningReport> update(final SyncDelta delta, final
List<String> keys)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Pull Realms: pull task with Unmatching Rules: PROVISION shouldn't create
> propagation task
> -----------------------------------------------------------------------------------------
>
> Key: SYNCOPE-1390
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1390
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.9, 2.1.1
> Reporter: Alexander Tsvetkov
> Assignee: Francesco Chicchiriccò
> Priority: Major
> Fix For: 2.0.11, 2.1.2, 3.0.0
>
>
> I need to pull Realms from Active Directotory.
> I have created Pull task with Unmatching Rules: PROVISION.
> According to the documentation
> ([https://syncope.apache.org/docs/reference-guide.html#provisioning-pull):]
> Unmatching Rules
> * {{IGNORE}}: do not perform any action;
> * {{UNLINK}}: do not perform any action;
> * {{ASSIGN}}: create internally, assign the external resource;
> * {{PROVISION}}: create internally, do not assign the external resource.
> BUT propagation tasks are created for this pull task.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)