Implement AbstractClientEntity.isUpdated to account for changes in associated protocol mappers.
Closes #10927
This commit is contained in:
parent
19e55650a2
commit
d8bee26ec8
1 changed files with 8 additions and 0 deletions
|
@ -20,9 +20,11 @@ import org.keycloak.models.map.common.AbstractEntity;
|
|||
import org.keycloak.models.map.common.EntityWithAttributes;
|
||||
import org.keycloak.models.map.common.UpdatableEntity;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Stream;
|
||||
import org.keycloak.models.map.annotations.GenerateEntityImplementations;
|
||||
|
@ -54,6 +56,12 @@ public interface MapClientEntity extends AbstractEntity, UpdatableEntity, Entity
|
|||
this.updated |= id != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpdated() {
|
||||
return this.updated
|
||||
|| Optional.ofNullable(getProtocolMappers()).orElseGet(Collections::emptyMap).values().stream().anyMatch(MapProtocolMapperEntity::isUpdated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<String> getClientScopes(boolean defaultScope) {
|
||||
final Map<String, Boolean> clientScopes = getClientScopes();
|
||||
|
|
Loading…
Reference in a new issue