Merged 5.2.N (5.2.2) to HEAD (5.2)

136708 jkaabimofrad: 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/HEAD/root@137497 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2017-06-15 11:06:54 +00:00
parent 803ff635e8
commit d4904cb8e9
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)