mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-8882 Edit Online: Modifier and Modified date are changed even no changes were applied
- needed to turn off ASPECT_AUDITABLE on removeProperty which is called on unlock - added code to not enable this aspect early if nested calls were made (this is not done, but is safer this way) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32047 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -94,6 +94,7 @@
|
|||||||
<property name="methodNames">
|
<property name="methodNames">
|
||||||
<list>
|
<list>
|
||||||
<value>setProperty</value>
|
<value>setProperty</value>
|
||||||
|
<value>removeProperty</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="argumentValues">
|
<property name="argumentValues">
|
||||||
|
@@ -83,9 +83,15 @@ public class DisableAuditableBehaviourInterceptor implements MethodInterceptor
|
|||||||
methodNames.contains(methodName) &&
|
methodNames.contains(methodName) &&
|
||||||
(arg1 == null || argumentQNameValues.contains(arg1)))
|
(arg1 == null || argumentQNameValues.contains(arg1)))
|
||||||
{
|
{
|
||||||
|
Set<NodeRef> disabledNodeRefs = new HashSet<NodeRef>(); // Avoid nested calls that enable the aspect early
|
||||||
for (NodeRef nodeRef : nodes)
|
for (NodeRef nodeRef : nodes)
|
||||||
{
|
{
|
||||||
behaviourFilter.disableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);
|
if (!disabledNodeRefs.contains(nodeRef) &&
|
||||||
|
behaviourFilter.isEnabled(nodeRef, ContentModel.ASPECT_AUDITABLE))
|
||||||
|
{
|
||||||
|
behaviourFilter.disableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);
|
||||||
|
disabledNodeRefs.add(nodeRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -95,7 +101,10 @@ public class DisableAuditableBehaviourInterceptor implements MethodInterceptor
|
|||||||
{
|
{
|
||||||
for (NodeRef nodeRef : nodes)
|
for (NodeRef nodeRef : nodes)
|
||||||
{
|
{
|
||||||
behaviourFilter.enableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);
|
if (disabledNodeRefs.contains(nodeRef))
|
||||||
|
{
|
||||||
|
behaviourFilter.enableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user