mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MT - System "runAs" will run in MT-context
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8277 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -167,8 +167,8 @@ public class AuditableAspect
|
||||
// Set the updated property values (but do not cascade to update audit behaviour)
|
||||
onUpdateAudit.disable();
|
||||
|
||||
// note: special MT case - need to run in context of user's domain ... although checkForLock requires System
|
||||
AuthenticationUtil.runAs(new SetAuditProperties(nodeService, nodeRef, properties), tenantService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantService.getCurrentUserDomain()));
|
||||
// note: in MT case, this will run in System context of user's domain ... checkForLock requires System
|
||||
AuthenticationUtil.runAs(new SetAuditProperties(nodeService, nodeRef, properties), AuthenticationUtil.getSystemUserName());
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -201,8 +201,8 @@ public class AuditableAspect
|
||||
|
||||
// Set the updated property values
|
||||
|
||||
// note: special MT case - need to run in context of user's domain ... although checkForLock requires System
|
||||
AuthenticationUtil.runAs(new SetAuditProperties(nodeService, nodeRef, properties), tenantService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantService.getCurrentUserDomain()));
|
||||
// note: in MT case, this will run in System context of user's domain ... checkForLock requires System
|
||||
AuthenticationUtil.runAs(new SetAuditProperties(nodeService, nodeRef, properties), AuthenticationUtil.getSystemUserName());
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Auditable node " + nodeRef + " updated [modified=" + now + ";modifier=" + modifier + "]");
|
||||
|
Reference in New Issue
Block a user