andrea-patricelli commented on a change in pull request #319:
URL: https://github.com/apache/syncope/pull/319#discussion_r818411112



##########
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:
       here is possible 
https://github.com/apache/syncope/blob/c8d86c28ee95192e6f81eb67f7fb89f3f6f72a07/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java#L790-L792




-- 
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


Reply via email to