mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
code review comments
This commit is contained in:
@@ -637,7 +637,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
||||
if (!nodeService.hasAspect(nodeRef, ASPECT_FROZEN))
|
||||
{
|
||||
//set in transaction cache in order not to trigger update policy when adding the aspect
|
||||
transactionalResourceHelper.getSet(nodeRef).add("frozen");
|
||||
transactionalResourceHelper.getSet("frozen").add(nodeRef);
|
||||
// add freeze aspect
|
||||
nodeService.addAspect(nodeRef, ASPECT_FROZEN, props);
|
||||
|
||||
|
@@ -241,7 +241,7 @@ public class FrozenAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
|
||||
// check to not throw exception when the aspect is being added
|
||||
if (nodeService.exists(nodeRef) && freezeService.isFrozen(nodeRef) &&
|
||||
!transactionalResourceHelper.getSet(nodeRef).contains("frozen") )
|
||||
!transactionalResourceHelper.getSet("frozen").contains(nodeRef) )
|
||||
{
|
||||
throw new AccessDeniedException("Frozen nodes can not be updated.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user