diff --git a/services/src/main/java/org/keycloak/services/resources/admin/ClientsResource.java b/services/src/main/java/org/keycloak/services/resources/admin/ClientsResource.java index c899fdfe7b..6fe3837f29 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/ClientsResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/ClientsResource.java @@ -118,6 +118,9 @@ public class ClientsResource { if (clientModel == null) { throw new NotFoundException("Could not find client: " + name); } + + session.getContext().setClient(clientModel); + ClientResource clientResource = new ClientResource(realm, auth, clientModel, session, adminEvent); ResteasyProviderFactory.getInstance().injectProperties(clientResource); return clientResource; diff --git a/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java index e2899fe0ea..820fcfb39c 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java @@ -438,8 +438,8 @@ public class RealmAdminResource { /** * Query admin events. Returns all admin events, or will query based on URL query parameters listed here * - * @param client app or oauth client name - * @param operationTypes operation type + * @param authRealm + * @param authClient * @param authUser user id * @param authIpAddress * @param resourcePath diff --git a/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java index fbe401c138..2d14b4bc30 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java @@ -227,7 +227,8 @@ public class RealmsAdminResource { } AdminEventBuilder adminEvent = new AdminEventBuilder(realm, auth, session, clientConnection); - + session.getContext().setRealm(realm); + RealmAdminResource adminResource = new RealmAdminResource(realmAuth, realm, tokenManager, adminEvent); ResteasyProviderFactory.getInstance().injectProperties(adminResource); //resourceContext.initResource(adminResource);