mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user