mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-10902 - No friendly notification occurs when Editor or Collaborator tries to delete content
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32131 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -153,7 +153,6 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
||||
public void init()
|
||||
{
|
||||
PropertyCheck.mandatory(this, "checkOutCheckInService", checkOutCheckInService);
|
||||
// PropertyCheck.mandatory(this, "shuffleCache", shuffleCache);
|
||||
PropertyCheck.mandatory(this, "cifsHelper", cifsHelper);
|
||||
PropertyCheck.mandatory(this, "namespaceService", namespaceService);
|
||||
PropertyCheck.mandatory(this, "nodeService", nodeService);
|
||||
@@ -1866,6 +1865,10 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
||||
|
||||
if ( permissionService.hasPermission(nodeRef, PermissionService.WRITE) == AccessStatus.DENIED)
|
||||
{
|
||||
if(logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("write access denied to : + name");
|
||||
}
|
||||
throw new AccessDeniedException("No write access to " + name);
|
||||
}
|
||||
|
||||
@@ -1875,6 +1878,16 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
||||
// Check if the file is being marked for deletion, if so then check if the file is locked
|
||||
if ( info.hasSetFlag(FileInfo.SetDeleteOnClose) && info.hasDeleteOnClose())
|
||||
{
|
||||
if(logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("delete access denied to : + name");
|
||||
}
|
||||
// Check for delete permission
|
||||
if ( permissionService.hasPermission(nodeRef, PermissionService.DELETE) == AccessStatus.DENIED)
|
||||
{
|
||||
throw new AccessDeniedException("No delete access to " + name);
|
||||
}
|
||||
|
||||
// Check if the node is locked
|
||||
lockService.checkForLock(nodeRef);
|
||||
|
||||
@@ -2600,10 +2613,6 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
||||
|
||||
nodeService.addAspect(nodeRef, ContentModel.ASPECT_NO_CONTENT, null);
|
||||
|
||||
// Create the network file
|
||||
|
||||
// ContentNetworkFile netFile = ContentNetworkFile.createFile(nodeService, contentService, mimetypeService, getCifsHelper(), nodeRef, params, sess);
|
||||
|
||||
File file = TempFileProvider.createTempFile("cifs", ".bin");
|
||||
|
||||
TempNetworkFile netFile = new TempNetworkFile(file, path);
|
||||
@@ -2898,7 +2907,6 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public OpLockManager getOpLockManager(SrvSession sess, TreeConnection tree)
|
||||
{
|
||||
|
Reference in New Issue
Block a user