mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -30,6 +30,7 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.jcr.repository.RepositoryFactory;
|
||||
import org.alfresco.jcr.repository.RepositoryImpl;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -44,6 +45,7 @@ public class BaseJCRTest extends TestCase
|
||||
private RepositoryImpl repositoryImpl;
|
||||
protected Repository repository;
|
||||
protected StoreRef storeRef;
|
||||
protected String adminUserName;
|
||||
|
||||
protected static ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:org/alfresco/jcr/test/test-context.xml");
|
||||
|
||||
@@ -51,6 +53,11 @@ public class BaseJCRTest extends TestCase
|
||||
{
|
||||
return storeRef.getIdentifier();
|
||||
}
|
||||
|
||||
protected String getAdminUserName()
|
||||
{
|
||||
return adminUserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
@@ -60,6 +67,7 @@ public class BaseJCRTest extends TestCase
|
||||
repositoryImpl = (RepositoryImpl)applicationContext.getBean(RepositoryFactory.REPOSITORY_BEAN);
|
||||
repositoryImpl.setDefaultWorkspace(storeRef.getIdentifier());
|
||||
repository = repositoryImpl;
|
||||
adminUserName = AuthenticationUtil.getAdminUserName();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user