bug5454: setting userGroupProvider on UserImpl to local UserStoreImpl when migrating from de-serialized UserStoreImpl to local store

This commit is contained in:
Axel Uhl
2020-12-10 00:29:56 +01:00
parent 2ef2589e59
commit 080552372b
4 changed files with 7 additions and 9 deletions
@@ -490,7 +490,8 @@ public class UserStoreImpl implements UserStore {
roleDefinitions.put(roleDefinition.getId(), roleDefinition);
}
LockUtil.executeWithWriteLock(preferenceLock, () -> {
for (User user : newUserStore.getUsers()) {
for (final User user : newUserStore.getUsers()) {
user.setUserGroupProvider(this);
users.put(user.getName(), user);
addToUsersByEmail(user);
for (Entry<String, String> userPref : newUserStore.getAllPreferences(user.getName()).entrySet()) {