Merged 5.2.0 (5.2.0) to HEAD (5.2)

133416 rneamtu: Merged 5.2.N (5.2.1) to 5.2.0 (5.2.0)
      133350 rneamtu: ACE-5647: [Win7,chrome] Configure dashboard - Configuration not saved after removing dashlets to trashcan	
         -Run the deleteDocument action as pathRunAsUser (system for non-admin users) same as is done for updateDocument and createDocument.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@133563 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2016-12-12 09:38:58 +00:00
parent d55a13c3c3
commit 2bcc803206

View File

@@ -626,10 +626,17 @@ public class ADMRemoteStore extends BaseRemoteStore
return; return;
} }
final String runAsUser = getPathRunAsUser(path);
AuthenticationUtil.runAs(new RunAsWork<Void>()
{
@SuppressWarnings("synthetic-access")
public Void doWork() throws Exception
{
try try
{ {
final NodeRef fileRef = fileInfo.getNodeRef(); final NodeRef fileRef = fileInfo.getNodeRef();
this.nodeService.addAspect(fileRef, ContentModel.ASPECT_TEMPORARY, null); // MNT-16371: Revoke ownership privileges for surf-config folder contents, to tighten access for former SiteManagers.
nodeService.addAspect(fileRef, ContentModel.ASPECT_TEMPORARY, null);
// ALF-17729 // ALF-17729
NodeRef parentFolderRef = unprotNodeService.getPrimaryParent(fileRef).getParentRef(); NodeRef parentFolderRef = unprotNodeService.getPrimaryParent(fileRef).getParentRef();
@@ -637,7 +644,7 @@ public class ADMRemoteStore extends BaseRemoteStore
try try
{ {
this.nodeService.deleteNode(fileRef); nodeService.deleteNode(fileRef);
} }
finally finally
{ {
@@ -652,6 +659,9 @@ public class ADMRemoteStore extends BaseRemoteStore
res.setStatus(Status.STATUS_UNAUTHORIZED); res.setStatus(Status.STATUS_UNAUTHORIZED);
throw ae; throw ae;
} }
return null;
}
}, runAsUser);
} }
/** /**