git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4729 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-01-04 17:11:31 +00:00
parent 08bf759565
commit 7e4430cae9

View File

@@ -53,6 +53,7 @@ import org.alfresco.repo.dictionary.M2Model;
import org.alfresco.repo.dictionary.M2Property; import org.alfresco.repo.dictionary.M2Property;
import org.alfresco.repo.security.authentication.AuthenticationComponent; import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.transaction.TransactionUtil; import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.repo.transaction.TransactionUtil.TransactionWork;
import org.alfresco.service.ServiceRegistry; import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.action.Action; import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionCondition; import org.alfresco.service.cmr.action.ActionCondition;
@@ -151,7 +152,15 @@ public class RuleServiceCoverageTest extends TestCase
//authenticationComponent.setCurrentUser(authenticationComponent.getSystemUserName()); //authenticationComponent.setCurrentUser(authenticationComponent.getSystemUserName());
//authenticationComponent.setSystemUserAsCurrentUser(); //authenticationComponent.setSystemUserAsCurrentUser();
TransactionWork<Object> setUserWork = new TransactionWork<Object>()
{
public Object doWork() throws Exception
{
authenticationComponent.setCurrentUser("admin"); authenticationComponent.setCurrentUser("admin");
return null;
}
};
TransactionUtil.executeInUserTransaction(transactionService, setUserWork);
this.testStoreRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis()); this.testStoreRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
this.rootNodeRef = this.nodeService.getRootNode(this.testStoreRef); this.rootNodeRef = this.nodeService.getRootNode(this.testStoreRef);