add defaults in case of missing attributes

This commit is contained in:
Hugo Renard 2022-09-21 10:17:25 +02:00
parent a5295da1bf
commit a593351568
Signed by: hougo
GPG key ID: 3A285FD470209C59

View file

@ -21,8 +21,8 @@ public class ScimDispatcher {
public void run(String scope, Consumer<ScimClient> f) {
session.getContext().getRealm().getComponentsStream()
.filter((m) -> {
return ScimStorageProviderFactory.ID.equals(m.getProviderId()) && m.get("enabled").equals("true")
&& m.get("propagation-" + scope).equals("true");
return ScimStorageProviderFactory.ID.equals(m.getProviderId()) && m.get("enabled", true)
&& m.get("propagation-" + scope, false);
})
.forEach(m -> runOne(m, f));
}