Revert "MNT-18497: Implement linkedNodeToJson logic"

This reverts commit 2835d684
This commit is contained in:
kristian
2020-03-05 11:07:15 +00:00
parent 2835d684d8
commit ae7e3fe39e
2 changed files with 2 additions and 34 deletions

View File

@@ -18,7 +18,6 @@ branches:
only:
- master
- /support\/.*/
- fix/MNT-18497_Rendering-folder-with-links-is-slow-in-share
stages:
- test

View File

@@ -234,38 +234,7 @@ public class JSONConversionComponent
return json;
}
/**
* MNT-18497
* Convert a linkedNode reference to a JSON object. Selects the correct converter based on selection
* implementation. Skips adding properties and aspects of targetNodeRef
*/
@SuppressWarnings("unchecked")
public JSONObject linkedNodeToJSONObject(final NodeRef nodeRef, final boolean useShortQNames)
{
final JSONObject json = new JSONObject();
if (this.nodeService.exists(nodeRef))
{
if (publicServiceAccessService.hasAccess(ServiceRegistry.NODE_SERVICE.getLocalName(), "getProperties", nodeRef) == AccessStatus.ALLOWED)
{
// init namespace prefix cache
namespacePrefixCache.get().clear();
// Get node info
FileInfo nodeInfo = this.fileFolderService.getFileInfo(nodeRef);
// Set root values
setRootValues(nodeInfo, json, useShortQNames);
// add permissions
json.put("permissions", permissionsToJSON(nodeRef));
}
}
return json;
}
/**
*
* @param nodeInfo FileInfo
@@ -288,7 +257,7 @@ public class JSONConversionComponent
NodeRef targetNodeRef = nodeInfo.getLinkNodeRef();
if (targetNodeRef != null)
{
rootJSONObject.put("linkedNode", linkedNodeToJSONObject(targetNodeRef, useShortQNames));
rootJSONObject.put("linkedNode", toJSONObject(targetNodeRef, useShortQNames));
}
}