mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
fix for CLOUD-2150: Trashcan for network admins only shows their deleted content.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@57583 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,7 +23,6 @@ import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.node.archive.ArchivedNodesCannedQueryBuilder;
|
||||
import org.alfresco.repo.node.archive.NodeArchiveService;
|
||||
@@ -188,13 +187,9 @@ public abstract class AbstractArchivedNodeWebScript extends DeclarativeWebScript
|
||||
|
||||
protected void validatePermission(NodeRef nodeRef, String currentUser)
|
||||
{
|
||||
String archivedBy = (String) serviceRegistry.getNodeService().getProperty(nodeRef, ContentModel.PROP_ARCHIVED_BY);
|
||||
if (!(currentUser.equals(archivedBy)))
|
||||
{
|
||||
if (!(serviceRegistry.getAuthorityService().isAdminAuthority(currentUser)))
|
||||
if (!nodeArchiveService.hasFullAccess(nodeRef))
|
||||
{
|
||||
throw new WebScriptException(Status.STATUS_FORBIDDEN, "You don't have permission to act on the node.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user