Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

69950: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud)
      69869: Fix action's runAs user (found investigating MNT-11310)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70466 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-05-16 20:10:47 +00:00
parent 5763abbf6d
commit 85c8583145

View File

@@ -38,6 +38,7 @@ import org.alfresco.repo.copy.DefaultCopyBehaviourCallback;
import org.alfresco.repo.policy.JavaBehaviour; import org.alfresco.repo.policy.JavaBehaviour;
import org.alfresco.repo.policy.PolicyComponent; import org.alfresco.repo.policy.PolicyComponent;
import org.alfresco.repo.security.authentication.AuthenticationContext; import org.alfresco.repo.security.authentication.AuthenticationContext;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.tenant.TenantUtil; import org.alfresco.repo.tenant.TenantUtil;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport; import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.service.cmr.action.Action; import org.alfresco.service.cmr.action.Action;
@@ -1624,9 +1625,9 @@ public class ActionServiceImpl implements ActionService, RuntimeActionService, A
// Set the run as user to the current user // Set the run as user to the current user
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled() == true)
{ {
logger.debug("The current user is: " + this.authenticationContext.getCurrentUserName()); logger.debug("The current user is: " + AuthenticationUtil.getRunAsUser());
} }
((ActionImpl) action).setRunAsUser(this.authenticationContext.getCurrentUserName()); ((ActionImpl) action).setRunAsUser(AuthenticationUtil.getRunAsUser());
// Set the tenant context to the current tenant // Set the tenant context to the current tenant
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled() == true)