Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Missed applying the sparql-update
  • Loading branch information
whikloj committed Sep 7, 2015
1 parent dc10334 commit 9c106ff
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -125,12 +125,15 @@ private String ingestObj(final String path) throws IOException {
* @throws UnsupportedEncodingException
*/
private void linkToAcl(final String protectedResource, final String aclResource)
throws UnsupportedEncodingException {
throws UnsupportedEncodingException, IOException {
final HttpPatch request = super.patchObjMethod(protectedResource.replace(serverAddress, ""));
setAuth(request, "fedoraAdmin");
request.setHeader("Content-type", "application/sparql-update");
request.setEntity(new StringEntity(
"INSERT { <> <" + WEBAC_ACCESS_CONTROL_VALUE + "> <" + aclResource + "> . } WHERE {}"));
try (final CloseableHttpResponse response = super.execute(request)) {
assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatusLine().getStatusCode());
}
}

/**
Expand Down

0 comments on commit 9c106ff

Please sign in to comment.