Applied PR suggestion: added resourceType and changed operation types

This commit is contained in:
Albert-Jan Verhees 2021-01-13 12:22:23 +01:00 committed by Hynek Mlnařík
parent 483e28bb02
commit b0ac44cf7d
2 changed files with 9 additions and 4 deletions

View file

@ -148,6 +148,11 @@ public enum ResourceType {
*/
, CLIENT_SCOPE_MAPPING
/**
*
*/
, CLIENT_SCOPE_CLIENT_MAPPING
/**
*
*/

View file

@ -332,8 +332,8 @@ public class ClientResource {
}
client.addClientScope(clientScope, defaultScope);
final ClientRepresentation rep = ModelToRepresentation.toRepresentation(client, session);
adminEvent.operation(OperationType.UPDATE).resource(ResourceType.CLIENT).resourcePath(session.getContext().getUri()).representation(rep).success();
final ClientScopeRepresentation rep = ModelToRepresentation.toRepresentation(clientScope, session);
adminEvent.operation(OperationType.CREATE).resource(ResourceType.CLIENT_SCOPE_CLIENT_MAPPING).resourcePath(session.getContext().getUri()).representation(rep).success();
}
@ -349,8 +349,8 @@ public class ClientResource {
}
client.removeClientScope(clientScope);
final ClientRepresentation rep = ModelToRepresentation.toRepresentation(client, session);
adminEvent.operation(OperationType.UPDATE).resource(ResourceType.CLIENT).resourcePath(session.getContext().getUri()).representation(rep).success();
final ClientScopeRepresentation rep = ModelToRepresentation.toRepresentation(clientScope, session);
adminEvent.operation(OperationType.DELETE).resource(ResourceType.CLIENT_SCOPE_CLIENT_MAPPING).resourcePath(session.getContext().getUri()).representation(rep).success();
}