Commit 73599ef4 authored by Matija Obreza's avatar Matija Obreza

FIX: Missing @CacheEvict on OAuth updateClient()

parent 158cecf3
...@@ -618,6 +618,8 @@ public class OAuthServiceImpl implements OAuthClientDetailsService, OAuthTokenSt ...@@ -618,6 +618,8 @@ public class OAuthServiceImpl implements OAuthClientDetailsService, OAuthTokenSt
*/ */
@Override @Override
@Transactional @Transactional
@CacheEvict(cacheNames = { "oauthclient" }, key = "#client.clientId", condition = "#client != null")
public OAuthClient removeClient(final OAuthClient client) { public OAuthClient removeClient(final OAuthClient client) {
oauthClientRepository.delete(client); oauthClientRepository.delete(client);
return client; return client;
...@@ -681,6 +683,7 @@ public class OAuthServiceImpl implements OAuthClientDetailsService, OAuthTokenSt ...@@ -681,6 +683,7 @@ public class OAuthServiceImpl implements OAuthClientDetailsService, OAuthTokenSt
*/ */
@Override @Override
@Transactional @Transactional
@CacheEvict(cacheNames = { "oauthclient" }, key = "#updates.clientId", condition = "#updates != null")
public OAuthClient updateClient(final long id, final int version, final OAuthClient updates) { public OAuthClient updateClient(final long id, final int version, final OAuthClient updates) {
OAuthClient client = oauthClientRepository.findByIdAndVersion(id, version); OAuthClient client = oauthClientRepository.findByIdAndVersion(id, version);
client.apply(updates); client.apply(updates);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment