ilgrosso commented on a change in pull request #319: URL: https://github.com/apache/syncope/pull/319#discussion_r818412425
########## File path: core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java ########## @@ -681,32 +711,21 @@ private boolean isPasswordMapped(final ExternalResource resource) { @Transactional(readOnly = true) @Override public LinkedAccountTO getLinkedAccountTO(final LinkedAccount account) { - LinkedAccountTO accountTO = new LinkedAccountTO.Builder( - account.getKey(), account.getResource().getKey(), account.getConnObjectKeyValue()). - username(account.getUsername()). - password(account.getPassword()). - suspended(BooleanUtils.isTrue(account.isSuspended())). - build(); - - account.getPlainAttrs().forEach(plainAttr -> { - accountTO.getPlainAttrs().add(new AttrTO.Builder(). - schema(plainAttr.getSchema().getKey()). - values(plainAttr.getValuesAsStrings()).build()); - }); - - accountTO.getPrivileges().addAll(account.getPrivileges().stream(). - map(Entity::getKey).collect(Collectors.toList())); - - return accountTO; + return getLinkedAccountTO(account, true); Review comment: Sounds good, thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@syncope.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org