/** * Verify that another user cannot control the child of a private resource. */ @Test @DisplayName("Verify that another user cannot control the child of a private resource") default void testOtherUserCanControlPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot control the child of a private resource. */ @Test @DisplayName("Verify that another user cannot control the child of a private resource") default void testOtherUserCanControlPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot read the child of a private resource. */ @Test @DisplayName("Verify that another user cannot read the child of a private resource") default void testOtherUserCanReadPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot write to the child of a private resource. */ @Test @DisplayName("Verify that another user cannot write to the child of a private resource") default void testOtherUserCanWritePrivateResourceChild() { try (final Response res = target(getPrivateContainerChild()).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 read the child of a private resource. */ @Test @DisplayName("Verify that another user cannot read the child of a private resource") default void testOtherUserCanReadPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot write to the child of a private resource. */ @Test @DisplayName("Verify that another user cannot write to the child of a private resource") default void testOtherUserCanWritePrivateResourceChild() { try (final Response res = target(getPrivateContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }