mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126511 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 122817 jvonka: (Quick) Shared Links API - retrieve rendition content (no auth required) - TODO add extra test RA-830 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126855 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -46,6 +46,7 @@ import org.alfresco.rest.framework.core.exceptions.ApiException;
|
||||
import org.alfresco.rest.framework.jacksonextensions.JacksonHelper;
|
||||
import org.alfresco.rest.framework.resource.actions.ActionExecutor;
|
||||
import org.alfresco.rest.framework.resource.actions.interfaces.BinaryResourceAction;
|
||||
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceBinaryAction;
|
||||
import org.alfresco.rest.framework.resource.content.BinaryResource;
|
||||
import org.alfresco.rest.framework.resource.content.ContentInfo;
|
||||
import org.alfresco.rest.framework.resource.content.FileBinaryResource;
|
||||
@@ -112,7 +113,21 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
|
||||
if (toSerialize instanceof BinaryResource)
|
||||
{
|
||||
// TODO review (experimental) - can we move earlier & wrap complete execute ? Also for QuickShare (in MT/Cloud) needs to be tenant for the nodeRef (TBC).
|
||||
boolean noAuth = resource.getMetaData().isNoAuth(BinaryResourceAction.Read.class);
|
||||
boolean noAuth = false;
|
||||
|
||||
if (BinaryResourceAction.Read.class.isAssignableFrom(resource.getResource().getClass()))
|
||||
{
|
||||
noAuth = resource.getMetaData().isNoAuth(BinaryResourceAction.Read.class);
|
||||
}
|
||||
else if (RelationshipResourceBinaryAction.Read.class.isAssignableFrom(resource.getResource().getClass()))
|
||||
{
|
||||
noAuth = resource.getMetaData().isNoAuth(RelationshipResourceBinaryAction.Read.class);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Unexpected");
|
||||
}
|
||||
|
||||
if (noAuth)
|
||||
{
|
||||
String networkTenantDomain = TenantUtil.getCurrentDomain();
|
||||
|
Reference in New Issue
Block a user