mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
122008 jvonka: (Quick) Shared Links API - limit @WebApiNoAuth to specific GET methods (not complete resource) RA-775, RA-750 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126448 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -125,11 +125,20 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
* <p>
|
||||
* Note: does *not* require authenticated access for (public) shared link.
|
||||
*/
|
||||
public QuickShareLink readById(String sharedId, Parameters parameters)
|
||||
public QuickShareLink readById(final String sharedId, Parameters parameters)
|
||||
{
|
||||
checkEnabled();
|
||||
|
||||
return getQuickShareInfo(sharedId);
|
||||
Pair<String, NodeRef> pair = quickShareService.getTenantNodeRefFromSharedId(sharedId);
|
||||
String networkTenantDomain = pair.getFirst();
|
||||
|
||||
return TenantUtil.runAsSystemTenant(new TenantUtil.TenantRunAsWork<QuickShareLink>()
|
||||
{
|
||||
public QuickShareLink doWork() throws Exception
|
||||
{
|
||||
return getQuickShareInfo(sharedId);
|
||||
}
|
||||
}, networkTenantDomain);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,6 +263,7 @@ public class QuickShareLinksImpl implements QuickShareLinks, InitializingBean
|
||||
{
|
||||
// Note: this throws AccessDeniedException (=> 403) via QuickShareService (when NodeService tries to getAspects)
|
||||
QuickShareDTO qsDto = quickShareService.shareContent(nodeRef);
|
||||
|
||||
result.add(getQuickShareInfo(qsDto.getId()));
|
||||
}
|
||||
catch (AccessDeniedException ade)
|
||||
|
Reference in New Issue
Block a user