From 74139ec787bd01529a4b24b4fd0ba4ad336d8bf0 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Mon, 4 Jul 2016 09:28:39 -0300 Subject: [PATCH] [KEYCLOAK-3248] - Permissions don't unlink from resources and scopes --- .../models/authorization/infinispan/CachedPolicyStore.java | 2 +- .../models/authorization/infinispan/CachedResourceStore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedPolicyStore.java b/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedPolicyStore.java index 5178afc2f4..02800cecdf 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedPolicyStore.java +++ b/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedPolicyStore.java @@ -70,7 +70,7 @@ public class CachedPolicyStore implements PolicyStore { @Override public void delete(String id) { getDelegate().delete(id); - this.transaction.whenComplete(() -> cache.remove(id)); + this.transaction.whenComplete(() -> cache.remove(getCacheKeyForPolicy(id))); } @Override diff --git a/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java b/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java index 9e1ea14fba..aa587f5ce3 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java +++ b/model/infinispan/src/main/java/org/keycloak/models/authorization/infinispan/CachedResourceStore.java @@ -64,7 +64,7 @@ public class CachedResourceStore implements ResourceStore { @Override public void delete(String id) { - this.cache.evict(getCacheKeyForResource(id)); + this.cache.remove(getCacheKeyForResource(id)); getDelegate().delete(id); }