Merged HEAD-QA to HEAD (4.2) (including moving test classes into separate folders)

51903 to 54309 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Samuel Langlois
2013-08-20 17:17:31 +00:00
parent 0a36e2af67
commit ab4ca7177f
1576 changed files with 36419 additions and 8603 deletions

View File

@@ -27,7 +27,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
import javax.transaction.UserTransaction;
import org.alfresco.repo.admin.SysAdminParams;
import org.alfresco.repo.security.authentication.AuthenticationContext;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
@@ -50,7 +50,6 @@ public class TransactionServiceImpl implements TransactionService
private static VmShutdownListener shutdownListener = new VmShutdownListener("TransactionService");
private PlatformTransactionManager transactionManager;
private AuthenticationContext authenticationContext;
private int maxRetries = -1;
private int minRetryWaitMs = -1;
private int maxRetryWaitMs = -1;
@@ -86,17 +85,6 @@ public class TransactionServiceImpl implements TransactionService
this.transactionManager = transactionManager;
}
/**
* Sets the authentication context.
*
* @param authenticationContext
* the authentication context
*/
public void setAuthenticationContext(AuthenticationContext authenticationContext)
{
this.authenticationContext = authenticationContext;
}
public void setSysAdminParams(SysAdminParams sysAdminParams)
{
this.sysAdminParams = sysAdminParams;
@@ -111,7 +99,7 @@ public class TransactionServiceImpl implements TransactionService
vetoReadLock.lock();
try
{
return writeVeto.isEmpty();
return writeVeto.isEmpty() && this.sysAdminParams.getAllowWrite();
}
finally
{
@@ -184,7 +172,7 @@ public class TransactionServiceImpl implements TransactionService
vetoReadLock.lock();
try
{
if (this.authenticationContext.isCurrentUserTheSystemUser())
if (AuthenticationUtil.isRunAsUserTheSystemUser())
{
return false;
}