From b2d5de0078c1f48f1a90306e4c0ea8b765c3a852 Mon Sep 17 00:00:00 2001 From: Alexandru Epure Date: Wed, 24 May 2017 10:17:12 +0000 Subject: [PATCH] MNT-17199 - CSV user import: if password is left blank it should be randomly generated Modified UserCSVUploadPost behaviour to use an empty string for password creation instead of the user's first name. Modified RepositoryAuthenticationDao > createUser behaviour to treat the case when the password is an empty string or null. Added a Unit test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@136902 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java b/source/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java index 938aedf1d5..f8d988503c 100644 --- a/source/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java +++ b/source/java/org/alfresco/repo/web/scripts/person/UserCSVUploadPost.java @@ -527,7 +527,7 @@ public class UserCSVUploadPost extends DeclarativeWebScript // If no password was given, use their surname if (!user.containsKey(ContentModel.PROP_PASSWORD)) { - user.put(ContentModel.PROP_PASSWORD, user.get(ContentModel.PROP_LASTNAME)); + user.put(ContentModel.PROP_PASSWORD, ""); } // Skip any user who looks like an example file heading