/** * Verify that another user cannot control the child of a group-controlled resource. */ @Test @DisplayName("Verify that another user cannot control the child of a group-controlled resource") default void testOtherUserCanControlGroupResourceChild() { try (final Response res = target(getGroupContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user can read the child of a group-controlled resource. */ @Test @DisplayName("Verify that another user can read the child of a group-controlled resource") default void testOtherUserCanReadGroupResourceChild() { try (final Response res = target(getGroupContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that another user cannot control the child of a group-controlled resource. */ @Test @DisplayName("Verify that another user cannot control the child of a group-controlled resource") default void testOtherUserCanControlGroupResourceChild() { try (final Response res = target(getGroupContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user can read the child of a group-controlled resource. */ @Test @DisplayName("Verify that another user can read the child of a group-controlled resource") default void testOtherUserCanReadGroupResourceChild() { try (final Response res = target(getGroupContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that another user cannot write to the child of a group-controlled resource. */ @Test @DisplayName("Verify that another user cannot write to the child of a group-controlled resource") default void testOtherUserCanWriteGroupResourceChild() { try (final Response res = target(getGroupContainerChild()).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 the child of a group-controlled resource. */ @Test @DisplayName("Verify that another user cannot write to the child of a group-controlled resource") default void testOtherUserCanWriteGroupResourceChild() { try (final Response res = target(getGroupContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }