Merged V3.0 to HEAD

12178: Authenticate now required since introduction of public service usage in 3.0 test and authentication util changes.
  12180: Build fix for updating person properties - set all existing to keep quota properties.
  12187: MT - fix missing merge and fallout post authentication util changes
  12199: Usage Service - fix unit test fallout post authentication util changes
  12204: Authenticate now required since introduction of public service usage in 3.0 test and authentication util changes
  12206: Authenticate now required since authentication util changes
  12210: Module fixes - to use new authentication util api changes


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12515 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-12-19 13:22:28 +00:00
parent 3ab0ccf0df
commit c239ff31bb
6 changed files with 15 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
package org.alfresco.repo.web.scripts;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.util.PropertyMap;
@@ -54,6 +55,8 @@ public class RepositoryContainerTest extends BaseWebScriptTest
"AuthenticationService");
this.personService = (PersonService) getServer().getApplicationContext().getBean("PersonService");
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
// Create users
createUser(USER_ONE);
}
@@ -78,6 +81,7 @@ public class RepositoryContainerTest extends BaseWebScriptTest
@Override
protected void tearDown() throws Exception
{
AuthenticationUtil.clearCurrentSecurityContext();
super.tearDown();
}

View File

@@ -70,6 +70,8 @@ public class PersonServiceTest extends BaseWebScriptTest
this.authenticationComponent = (AuthenticationComponent)getServer().getApplicationContext().getBean("authenticationComponent");
this.personService = (PersonService)getServer().getApplicationContext().getBean("PersonService");
this.authenticationComponent.setSystemUserAsCurrentUser();
// Create users
createUser(USER_ONE);
createUser(USER_TWO);

View File

@@ -61,6 +61,8 @@ public class PreferenceServiceTest extends BaseWebScriptTest
this.authenticationComponent = (AuthenticationComponent)getServer().getApplicationContext().getBean("authenticationComponent");
this.personService = (PersonService)getServer().getApplicationContext().getBean("PersonService");
this.authenticationComponent.setSystemUserAsCurrentUser();
// Create users
createUser(USER_ONE);
createUser(USER_BAD);

View File

@@ -84,6 +84,8 @@ public class SiteServiceTest extends BaseWebScriptTest
this.siteService = (SiteService)getServer().getApplicationContext().getBean("SiteService");
this.nodeService = (NodeService)getServer().getApplicationContext().getBean("NodeService");
this.authenticationComponent.setSystemUserAsCurrentUser();
// Create users
createUser(USER_ONE);
createUser(USER_TWO);

View File

@@ -80,6 +80,8 @@ public class TaggingServiceTest extends BaseWebScriptTest
this.repositoryHelper = (Repository)getServer().getApplicationContext().getBean("repositoryHelper");
this.nodeService = (NodeService)getServer().getApplicationContext().getBean("NodeService");
this.authenticationComponent.setSystemUserAsCurrentUser();
// Add a load of tags ready to use
this.taggingService.createTag(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"), TAG_1);
this.taggingService.createTag(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"), TAG_2);

View File

@@ -29,6 +29,7 @@ import java.io.InputStream;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.model.Repository;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.web.scripts.BaseWebScriptTest;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.model.FileInfo;
@@ -69,6 +70,8 @@ public class ThumbnailServiceTest extends BaseWebScriptTest
this.contentService = (ContentService)getServer().getApplicationContext().getBean("ContentService");
this.repositoryHelper = (Repository)getServer().getApplicationContext().getBean("repositoryHelper");
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
this.testRoot = this.repositoryHelper.getCompanyHome();
// Get test content