mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11875 - FTP Site Manager cannot remove content.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32632 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1579,19 +1579,29 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDeleteNode(NodeRef nodeRef)
|
||||
public void beforeDeleteNode(final NodeRef nodeRef)
|
||||
{
|
||||
for (ChildAssociationRef parentAssoc : nodeService.getParentAssocs(nodeRef))
|
||||
// RUN AS SYSTEM due to Node Service archive permissions problem ALF-11103
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
NodeRef folderRef = parentAssoc.getParentRef();
|
||||
if (this.nodeService.hasAspect(folderRef, ImapModel.ASPECT_IMAP_FOLDER))
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
this.messageCache.remove(nodeRef);
|
||||
for (ChildAssociationRef parentAssoc : nodeService.getParentAssocs(nodeRef))
|
||||
{
|
||||
NodeRef folderRef = parentAssoc.getParentRef();
|
||||
if (nodeService.hasAspect(folderRef, ImapModel.ASPECT_IMAP_FOLDER))
|
||||
{
|
||||
messageCache.remove(nodeRef);
|
||||
|
||||
// Force generation of a new change token
|
||||
getUidValidityTransactionListener(folderRef);
|
||||
// Force generation of a new change token
|
||||
getUidValidityTransactionListener(folderRef);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
}
|
||||
|
||||
private class UidValidityTransactionListener extends TransactionListenerAdapter
|
||||
|
Reference in New Issue
Block a user