RM-682 User with Manage Rules capability can't delete the rule

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@52162 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Craig Tan
2013-07-05 05:25:22 +00:00
parent 6e9d193afb
commit bdf16ff712

View File

@@ -88,6 +88,28 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
}
}
@Override
public void removeRule(final NodeRef nodeRef, final Rule rule)
{
if (recordsManagementService.isFilePlanComponent(nodeRef) == true && runAsRmAdmin == true)
{
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
ExtendedRuleServiceImpl.super.removeRule(nodeRef, rule);
return null;
}
});
}
else
{
super.removeRule(nodeRef, rule);
}
}
@Override
public void executeRule(final Rule rule, final NodeRef nodeRef, final Set<ExecutedRuleData> executedRules)
{