From bd92627376e8b993b2dc3030f95b3b0158213a61 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Thu, 12 Mar 2009 21:48:15 +0000 Subject: [PATCH] Merged V3.1 to HEAD 13256: Fix ETHREEOH-1221 Hard-coded use of "admin" username ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r13256 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13613 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/web/forms/FormsTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/web/forms/FormsTest.java b/source/java/org/alfresco/web/forms/FormsTest.java index 42aae65c02..901e2446bd 100644 --- a/source/java/org/alfresco/web/forms/FormsTest.java +++ b/source/java/org/alfresco/web/forms/FormsTest.java @@ -52,6 +52,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.service.cmr.model.*; +import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.security.authentication.MutableAuthenticationDao; import org.alfresco.util.TestWithUserUtils; import org.apache.shale.test.mock.*; @@ -123,12 +124,12 @@ public class FormsTest final NodeRef rootNodeRef = this.nodeService.getRootNode(testStoreRef); // Create an authenticate the user - if(!authenticationDAO.userExists("admin")) + if(!authenticationDAO.userExists(AuthenticationUtil.getAdminUserName())) { - authenticationService.createAuthentication("admin", "admin".toCharArray()); + authenticationService.createAuthentication(AuthenticationUtil.getAdminUserName(), "admin".toCharArray()); } - TestWithUserUtils.authenticateUser("admin", + TestWithUserUtils.authenticateUser(AuthenticationUtil.getAdminUserName(), "admin", rootNodeRef, authenticationService);