From ef79db9665ef5ac6c8815b2a19f7745ce2d34bdf Mon Sep 17 00:00:00 2001 From: rlucanu Date: Wed, 14 Aug 2019 17:54:37 +0300 Subject: [PATCH] RM-6904 code review changes --- .../model/rma/aspect/FrozenAspect.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FrozenAspect.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FrozenAspect.java index 00cdb290d2..7ddceb5808 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FrozenAspect.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FrozenAspect.java @@ -214,14 +214,14 @@ public class FrozenAspect extends BaseBehaviourBean ) public void onMoveNode(final ChildAssociationRef oldChildAssocRef, final ChildAssociationRef newChildAssocRef) { - AuthenticationUtil.runAs((RunAsWork) () -> { + AuthenticationUtil.runAsSystem((RunAsWork) () -> { if (nodeService.exists(newChildAssocRef.getParentRef()) && nodeService.exists(newChildAssocRef.getChildRef())) { throw new AccessDeniedException("Frozen nodes can not be moved."); } return null; - }, AuthenticationUtil.getSystemUserName()); + }); } /** @@ -279,13 +279,13 @@ public class FrozenAspect extends BaseBehaviourBean ) public void beforeCopy(QName classRef, NodeRef sourceNodeRef, NodeRef targetNodeRef) { - AuthenticationUtil.runAs((RunAsWork) () -> { + AuthenticationUtil.runAsSystem((RunAsWork) () -> { if (nodeService.exists(sourceNodeRef) && freezeService.isFrozen(sourceNodeRef)) { throw new AccessDeniedException("Frozen nodes can not be copied."); } return null; - }, AuthenticationUtil.getSystemUserName()); + }); } }