Fixed roleUpdate issue

revert-70aa11f8
Rasika Perera 8 years ago
parent ede140a1f4
commit d723e22a8c

@ -220,9 +220,7 @@ public class UserManagementServiceImpl implements UserManagementService {
log.debug("User credential of username: " + username + " has been changed"); log.debug("User credential of username: " + username + " has been changed");
} }
List<String> currentRoles = this.getFilteredRoles(userStoreManager, username); List<String> currentRoles = this.getFilteredRoles(userStoreManager, username);
List<String> newRoles = new ArrayList<>(); List<String> newRoles = Arrays.asList(userInfo.getRoles());
newRoles.add(DEFAULT_DEVICE_USER);
newRoles.addAll(Arrays.asList(userInfo.getRoles()));
List<String> rolesToAdd = new ArrayList<>(newRoles); List<String> rolesToAdd = new ArrayList<>(newRoles);
List<String> rolesToDelete = new ArrayList<>(); List<String> rolesToDelete = new ArrayList<>();

Loading…
Cancel
Save