From 4bd29e257b90672b77309ed81b5e1febf37a85c0 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Mon, 30 Sep 2024 11:21:12 -0300 Subject: [PATCH] Fixing tests Signed-off-by: Pedro Igor --- .../organization/InfinispanOrganizationProvider.java | 4 ++++ .../main/java/org/keycloak/storage/UserStorageManager.java | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/organization/InfinispanOrganizationProvider.java b/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/organization/InfinispanOrganizationProvider.java index 54634979be..b0e86723e4 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/organization/InfinispanOrganizationProvider.java +++ b/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/organization/InfinispanOrganizationProvider.java @@ -236,6 +236,10 @@ public class InfinispanOrganizationProvider implements OrganizationProvider { @Override public boolean isManagedMember(OrganizationModel organization, UserModel user) { + if (user == null) { + return false; + } + String cacheKey = cacheKeyMembership(getRealm(), organization, user); CachedMembership cached = realmCache.getCache().get(cacheKey, CachedMembership.class); diff --git a/model/storage-private/src/main/java/org/keycloak/storage/UserStorageManager.java b/model/storage-private/src/main/java/org/keycloak/storage/UserStorageManager.java index b86a44b131..894b16a444 100755 --- a/model/storage-private/src/main/java/org/keycloak/storage/UserStorageManager.java +++ b/model/storage-private/src/main/java/org/keycloak/storage/UserStorageManager.java @@ -116,7 +116,6 @@ public class UserStorageManager extends AbstractStorageManager