[KEYCLOAK-14653] Changed operation type to UPDATE when updating client scopes in a client and added representation.

This commit is contained in:
Albert-Jan Verhees 2020-07-06 10:09:22 +02:00 committed by Hynek Mlnařík
parent de09bdf32d
commit 483e28bb02

View file

@ -332,7 +332,8 @@ public class ClientResource {
}
client.addClientScope(clientScope, defaultScope);
adminEvent.operation(OperationType.CREATE).resource(ResourceType.CLIENT).resourcePath(session.getContext().getUri()).success();
final ClientRepresentation rep = ModelToRepresentation.toRepresentation(client, session);
adminEvent.operation(OperationType.UPDATE).resource(ResourceType.CLIENT).resourcePath(session.getContext().getUri()).representation(rep).success();
}
@ -348,7 +349,8 @@ public class ClientResource {
}
client.removeClientScope(clientScope);
adminEvent.operation(OperationType.DELETE).resource(ResourceType.CLIENT).resourcePath(session.getContext().getUri()).success();
final ClientRepresentation rep = ModelToRepresentation.toRepresentation(client, session);
adminEvent.operation(OperationType.UPDATE).resource(ResourceType.CLIENT).resourcePath(session.getContext().getUri()).representation(rep).success();
}
@ -534,9 +536,9 @@ public class ClientResource {
if (node == null) {
throw new BadRequestException("Node not found in params");
}
ReservedCharValidator.validate(node);
if (logger.isDebugEnabled()) logger.debug("Register node: " + node);
client.registerNode(node, Time.currentTime());
adminEvent.operation(OperationType.CREATE).resource(ResourceType.CLUSTER_NODE).resourcePath(session.getContext().getUri(), node).success();