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

@@ -36,6 +36,7 @@ import org.alfresco.model.ContentModel;
import org.alfresco.repo.dictionary.DictionaryDAO;
import org.alfresco.repo.dictionary.M2Model;
import org.alfresco.repo.node.archive.NodeArchiveService;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.MutableAuthenticationDao;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.version.common.counter.VersionCounterService;
@@ -121,7 +122,7 @@ public abstract class BaseVersionStoreTest extends BaseSpringTest
* Test user details
*/
private static final String PWD = "admin";
private static final String USER_NAME = "admin";
// private static final String USER_NAME = "admin";
/**
* Sets the meta model dao
@@ -196,12 +197,12 @@ public abstract class BaseVersionStoreTest extends BaseSpringTest
// Create an authenticate the user
if(!authenticationDAO.userExists(USER_NAME))
if(!authenticationDAO.userExists(AuthenticationUtil.getAdminUserName()))
{
authenticationService.createAuthentication(USER_NAME, PWD.toCharArray());
authenticationService.createAuthentication(AuthenticationUtil.getAdminUserName(), PWD.toCharArray());
}
TestWithUserUtils.authenticateUser(USER_NAME, PWD, this.rootNodeRef, this.authenticationService);
TestWithUserUtils.authenticateUser(AuthenticationUtil.getAdminUserName(), PWD, this.rootNodeRef, this.authenticationService);
}
/**
@@ -395,7 +396,7 @@ public abstract class BaseVersionStoreTest extends BaseSpringTest
}
// Check the creator
assertEquals(USER_NAME, newVersion.getCreator());
assertEquals(AuthenticationUtil.getAdminUserName(), newVersion.getCreator());
// Check the metadata properties of the version
Map<String, Serializable> props = newVersion.getVersionProperties();