mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-756 (Rule do not fire within collaboration site)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@52069 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -95,27 +95,25 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
||||
|
||||
// The dispositionSchedule node will not be executed by rules
|
||||
if (recordsManagementService.isFilePlanComponent(nodeRef) == true
|
||||
&& typeQName.equals(RecordsManagementModel.TYPE_DISPOSITION_SCHEDULE) == false)
|
||||
&& typeQName.equals(RecordsManagementModel.TYPE_DISPOSITION_SCHEDULE) == false
|
||||
&& isFilePlanComponentRule(rule) == true && runAsRmAdmin == true)
|
||||
{
|
||||
if (isFilePlanComponentRule(rule) == true && runAsRmAdmin == true)
|
||||
String user = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
try
|
||||
{
|
||||
String user = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
try
|
||||
{
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(filePlanAuthenticationService.getRmAdminUserName());
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
}
|
||||
finally
|
||||
{
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(user);
|
||||
}
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(filePlanAuthenticationService.getRmAdminUserName());
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
}
|
||||
else
|
||||
finally
|
||||
{
|
||||
// just execute the rule as the current user
|
||||
super.executeRule(rule, nodeRef, executedRules);
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(user);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// just execute the rule as the current user
|
||||
super.executeRule(rule, nodeRef, executedRules);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFilePlanComponentRule(Rule rule)
|
||||
|
Reference in New Issue
Block a user