Attempt to fix failing Unit Tests that are passing locally.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@97788 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2015-02-24 00:07:08 +00:00
parent ca1f697f45
commit fc3fb36a3b
3 changed files with 85 additions and 6 deletions

View File

@@ -34,8 +34,8 @@ import org.alfresco.module.org_alfresco_module_rm.capability.policy.ConfigAttrib
import org.alfresco.module.org_alfresco_module_rm.capability.policy.Policy;
import org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor;
import org.alfresco.module.org_alfresco_module_rm.util.AlfrescoTransactionSupport;
import org.alfresco.module.org_alfresco_module_rm.util.AuthenticationUtil;
import org.alfresco.module.org_alfresco_module_rm.util.TransactionalResourceHelper;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespacePrefixResolver;
import org.aopalliance.intercept.MethodInvocation;
@@ -66,6 +66,9 @@ public class RMEntryVoter extends RMSecurityCommon
/** Alfresco transaction support */
private AlfrescoTransactionSupport alfrescoTransactionSupport;
/** authentication util */
private AuthenticationUtil authenticationUtil;
/** Policy map */
private Map<String, Policy> policies = new HashMap<String, Policy>();
@@ -101,6 +104,14 @@ public class RMEntryVoter extends RMSecurityCommon
{
this.alfrescoTransactionSupport = alfrescoTransactionSupport;
}
/**
* @param authenticationUtil authentication util
*/
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
{
this.authenticationUtil = authenticationUtil;
}
/**
* Register a policy the voter
@@ -171,7 +182,7 @@ public class RMEntryVoter extends RMSecurityCommon
try
{
// The system user can do anything
if (AuthenticationUtil.isRunAsUserTheSystemUser())
if (authenticationUtil.isRunAsUserTheSystemUser())
{
if (logger.isDebugEnabled())
{