/** * Verify that another user cannot append to a private resource. */ @Test @DisplayName("Verify that another user cannot append to a private resource") default void testOtherUserCanAppendPrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot append to a private resource. */ @Test @DisplayName("Verify that another user cannot append to a private resource") default void testOtherUserCanAppendPrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot read a private resource. */ @Test @DisplayName("Verify that another user cannot read a private resource") default void testOtherUserCanReadPrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot read a private resource. */ @Test @DisplayName("Verify that another user cannot read a private resource") default void testOtherUserCanReadPrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot control a private resource. */ @Test @DisplayName("Verify that another user cannot control a private resource") default void testOtherUserCanControlPrivateResource() { try (final Response res = target(getPrivateContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot control a private resource. */ @Test @DisplayName("Verify that another user cannot control a private resource") default void testOtherUserCanControlPrivateResource() { try (final Response res = target(getPrivateContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot write to a private resource. */ @Test @DisplayName("Verify that another user cannot write to a private resource") default void testOtherUserCanWritePrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot write to a private resource. */ @Test @DisplayName("Verify that another user cannot write to a private resource") default void testOtherUserCanWritePrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }