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/BRANCHES/DEV/5.2.N/root@133350 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ramona Neamtu
2016-12-06 15:07:50 +00:00
parent bf47206dab
commit cc24b21c78

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);
} }
/** /**