Skip to content
Snippets Groups Projects
Commit ff6a3bbe authored by Nicola Fulvio Calabria's avatar Nicola Fulvio Calabria
Browse files

Removed job_id from external link generated endpoint

parent 526288d2
No related branches found
No related tags found
No related merge requests found
...@@ -224,6 +224,10 @@ public class UriService { ...@@ -224,6 +224,10 @@ public class UriService {
if (isLinkNode) { if (isLinkNode) {
endpoint = ((LinkNode) node).getTarget(); endpoint = ((LinkNode) node).getTarget();
String linkTarget = ((LinkNode) node).getTarget();
if (linkedServiceDAO.isLinkedServiceUrl(linkTarget)) {
endpoint += "&token=" + getEndpointToken(linkTarget);
}
} else { } else {
Location location = locationDAO.getNodeLocation(relativePath).orElse(null); Location location = locationDAO.getNodeLocation(relativePath).orElse(null);
...@@ -238,18 +242,13 @@ public class UriService { ...@@ -238,18 +242,13 @@ public class UriService {
} else { } else {
endpoint = fileServiceUrl + urlEncodePath(relativePath); endpoint = fileServiceUrl + urlEncodePath(relativePath);
} }
}
endpoint += "?jobId=" + job.getJobId(); endpoint += "?jobId=" + job.getJobId();
if (isLinkNode) { if (!"true".equals(NodeProperties.getNodePropertyByURI(node, NodeProperties.PUBLIC_READ_URI))) {
String linkTarget = ((LinkNode) node).getTarget();
if (linkedServiceDAO.isLinkedServiceUrl(linkTarget)) {
endpoint += "&token=" + getEndpointToken(linkTarget);
}
} else if (!"true".equals(NodeProperties.getNodePropertyByURI(node, NodeProperties.PUBLIC_READ_URI))) {
endpoint += "&token=" + getEndpointToken(fileServiceUrl + relativePath); endpoint += "&token=" + getEndpointToken(fileServiceUrl + relativePath);
} }
}
return endpoint; return endpoint;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment