Fixing tests

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
Pedro Igor 2024-09-30 11:21:12 -03:00
parent c558bbe118
commit 4bd29e257b
2 changed files with 4 additions and 1 deletions

View file

@ -236,6 +236,10 @@ public class InfinispanOrganizationProvider implements OrganizationProvider {
@Override @Override
public boolean isManagedMember(OrganizationModel organization, UserModel user) { public boolean isManagedMember(OrganizationModel organization, UserModel user) {
if (user == null) {
return false;
}
String cacheKey = cacheKeyMembership(getRealm(), organization, user); String cacheKey = cacheKeyMembership(getRealm(), organization, user);
CachedMembership cached = realmCache.getCache().get(cacheKey, CachedMembership.class); CachedMembership cached = realmCache.getCache().get(cacheKey, CachedMembership.class);

View file

@ -116,7 +116,6 @@ public class UserStorageManager extends AbstractStorageManager<UserStorageProvid
if (Profile.isFeatureEnabled(Profile.Feature.ORGANIZATION) && user != null) { if (Profile.isFeatureEnabled(Profile.Feature.ORGANIZATION) && user != null) {
// check if provider is enabled and user is managed member of a disabled organization OR provider is disabled and user is managed member // check if provider is enabled and user is managed member of a disabled organization OR provider is disabled and user is managed member
OrganizationProvider organizationProvider = session.getProvider(OrganizationProvider.class);
if (isOrganizationDisabled(session, user)) { if (isOrganizationDisabled(session, user)) {
return new ReadOnlyUserModelDelegate(user) { return new ReadOnlyUserModelDelegate(user) {
@Override @Override