KEYCLOAK-1355 Make admin requests to have RealmModel and ClientModel available in KeycloakContext

This commit is contained in:
mposolda 2015-05-28 09:35:47 +02:00
parent 5d4869f915
commit ce6576ce84
3 changed files with 7 additions and 3 deletions

View file

@ -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;

View file

@ -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

View file

@ -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);