mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Asynchronous rules are now executed as the user that triggers the rule.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2349 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -103,22 +103,9 @@ public abstract class RuleTriggerAbstractBase implements RuleTrigger
|
||||
*/
|
||||
protected void triggerRules(NodeRef nodeRef, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
String userName = authenticationComponent.getCurrentUserName();
|
||||
authenticationComponent.setSystemUserAsCurrentUser();
|
||||
try
|
||||
for (RuleType ruleType : this.ruleTypes)
|
||||
{
|
||||
for (RuleType ruleType : this.ruleTypes)
|
||||
{
|
||||
ruleType.triggerRuleType(nodeRef, actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
authenticationComponent.clearCurrentSecurityContext();
|
||||
if(userName != null)
|
||||
{
|
||||
authenticationComponent.setCurrentUser(userName);
|
||||
}
|
||||
ruleType.triggerRuleType(nodeRef, actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user