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
|
@Override
|
||||||
public void beforeDeleteNode(NodeRef nodeRef)
|
public void beforeDeleteNode(final NodeRef nodeRef)
|
||||||
|
{
|
||||||
|
// RUN AS SYSTEM due to Node Service archive permissions problem ALF-11103
|
||||||
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
for (ChildAssociationRef parentAssoc : nodeService.getParentAssocs(nodeRef))
|
for (ChildAssociationRef parentAssoc : nodeService.getParentAssocs(nodeRef))
|
||||||
{
|
{
|
||||||
NodeRef folderRef = parentAssoc.getParentRef();
|
NodeRef folderRef = parentAssoc.getParentRef();
|
||||||
if (this.nodeService.hasAspect(folderRef, ImapModel.ASPECT_IMAP_FOLDER))
|
if (nodeService.hasAspect(folderRef, ImapModel.ASPECT_IMAP_FOLDER))
|
||||||
{
|
{
|
||||||
this.messageCache.remove(nodeRef);
|
messageCache.remove(nodeRef);
|
||||||
|
|
||||||
// Force generation of a new change token
|
// Force generation of a new change token
|
||||||
getUidValidityTransactionListener(folderRef);
|
getUidValidityTransactionListener(folderRef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private class UidValidityTransactionListener extends TransactionListenerAdapter
|
private class UidValidityTransactionListener extends TransactionListenerAdapter
|
||||||
|
Reference in New Issue
Block a user