remove toggle federation when syncing
This commit is contained in:
parent
a0958f728d
commit
ff58a5664b
2 changed files with 4 additions and 4 deletions
|
@ -72,6 +72,10 @@ public class ScimClient {
|
|||
M kcModel) {
|
||||
var adapter = getAdapter(aClass);
|
||||
adapter.apply(kcModel);
|
||||
// If mapping exist then it was created by import so skip.
|
||||
if (adapter.query("findById", adapter.getId()).getSingleResult() != null) {
|
||||
return;
|
||||
}
|
||||
var retry = registry.retry("create-" + adapter.getId());
|
||||
var resource = retry.executeSupplier(() -> {
|
||||
try {
|
||||
|
|
|
@ -110,13 +110,9 @@ public class ScimStorageProviderFactory
|
|||
RealmModel realm = session.realms().getRealm(realmId);
|
||||
session.getContext().setRealm(realm);
|
||||
var client = new ScimClient(model, session);
|
||||
model.setEnabled(false);
|
||||
realm.updateComponent(model);
|
||||
client.sync(UserAdapter.class, result);
|
||||
client.sync(GroupAdapter.class, result);
|
||||
client.close();
|
||||
model.setEnabled(true);
|
||||
realm.updateComponent(model);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue