KEYCLOAK-2100: 500 Internal Server Error with Update the events provider via Admin REST API

This commit is contained in:
Bruno Oliveira 2015-11-17 09:17:19 -02:00
parent 96fe4269ec
commit 22c5c803ca

View file

@ -50,6 +50,7 @@ import org.keycloak.timer.TimerProvider;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import static java.lang.Boolean.TRUE;
import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.ProtocolMapperModel;
import org.keycloak.protocol.ProtocolMapperUtils; import org.keycloak.protocol.ProtocolMapperUtils;
@ -221,10 +222,13 @@ public class RealmManager implements RealmImporter {
if(rep.getEnabledEventTypes() != null) { if(rep.getEnabledEventTypes() != null) {
realm.setEnabledEventTypes(new HashSet<>(rep.getEnabledEventTypes())); realm.setEnabledEventTypes(new HashSet<>(rep.getEnabledEventTypes()));
} }
if(rep.isAdminEventsEnabled() != null) {
realm.setAdminEventsEnabled(rep.isAdminEventsEnabled()); realm.setAdminEventsEnabled(rep.isAdminEventsEnabled());
}
if(rep.isAdminEventsDetailsEnabled() != null){
realm.setAdminEventsDetailsEnabled(rep.isAdminEventsDetailsEnabled()); realm.setAdminEventsDetailsEnabled(rep.isAdminEventsDetailsEnabled());
} }
}
private void setupMasterAdminManagement(RealmModel realm) { private void setupMasterAdminManagement(RealmModel realm) {
// Need to refresh masterApp for current realm // Need to refresh masterApp for current realm