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
This commit is contained in:
Derek Hulley
2009-03-12 21:48:15 +00:00
parent ae58306cf9
commit 198ebe371e
48 changed files with 461 additions and 368 deletions

View File

@@ -30,6 +30,7 @@ import junit.framework.TestCase;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.MutableAuthenticationDao;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -114,9 +115,9 @@ public class SearchServiceTest extends TestCase
authenticationService.createAuthentication("andy", "andy".toCharArray());
}
if (!authenticationDAO.userExists("admin"))
if (!authenticationDAO.userExists(AuthenticationUtil.getAdminUserName()))
{
authenticationService.createAuthentication("admin", "admin".toCharArray());
authenticationService.createAuthentication(AuthenticationUtil.getAdminUserName(), "admin".toCharArray());
}
if (!authenticationDAO.userExists("administrator"))
@@ -165,7 +166,7 @@ public class SearchServiceTest extends TestCase
public void testAdmim()
{
authenticationComponent.setCurrentUser("admin");
authenticationComponent.setCurrentUser(AuthenticationUtil.getAdminUserName());
SearchParameters sp = new SearchParameters();
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery("PATH:\"//*\"");