Merged WEBAPP-API (5.2.1) to 5.2.N (5.2.1)

136574 jkaabimofrad: APPSREPO-179: Added an optional "include=path" parameter to the "list shared links" API.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@136708 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2017-05-12 09:30:10 +00:00
parent da8e77045b
commit b5e541d3de
5 changed files with 40 additions and 9 deletions

View File

@@ -579,14 +579,21 @@ public class QuickShareLinksImpl implements QuickShareLinks, RecognizedParamsExt
qs.setExpiresAt((Date) map.get("expiryDate"));
// note: if noAuth mode then do not return allowable operations (eg. but can be optionally returned when finding shared links)
if ((! noAuth) && includeParam.contains(PARAM_INCLUDE_ALLOWABLEOPERATIONS))
if (!noAuth)
{
if (quickShareService.canDeleteSharedLink(nodeRef, sharedByUserId))
if (includeParam.contains(PARAM_INCLUDE_ALLOWABLEOPERATIONS) && quickShareService.canDeleteSharedLink(nodeRef, sharedByUserId))
{
qs.setAllowableOperations(Collections.singletonList(Nodes.OP_DELETE));
}
// in noAuth mode we don't return the path info
if (includeParam.contains(PARAM_INCLUDE_PATH))
{
qs.setPathInfo(nodes.lookupPathInfo(nodeRef, null));
}
}
return qs;
}
catch (InvalidSharedIdException ex)