/** * Verify that another user can append to a public resource. */ @Test @DisplayName("Verify that another user can append to a public resource") default void testOtherUserCanAppendProtectedResource() { try (final Response res = target(getProtectedContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_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 append to a default ACL resource. */ @Test @DisplayName("Verify that another user cannot append to a default ACL resource") default void testOtherUserCanAppendDefaultAclResource() { try (final Response res = target(getDefaultContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot control the child of a default ACL resource. */ @Test @DisplayName("Verify that another user cannot control the child of a default ACL resource") default void testOtherUserCanControlDefaultAclResourceChild() { try (final Response res = target(getDefaultContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } } }
/** * Verify that another user cannot control a public resource. */ @Test @DisplayName("Verify that another user cannot control a public resource") default void testOtherUserCanControlPublicResource() { try (final Response res = target(getPublicContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user can read the child of a protected resource. */ @Test @DisplayName("Verify that another user can read the child of a protected resource") default void testOtherUserCanReadProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_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 control a default ACL resource. */ @Test @DisplayName("Verify that another user cannot control a default ACL resource") default void testOtherUserCanControlDefaultAclResource() { try (final Response res = target(getDefaultContainer() + 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 can read a group-controlled resource. */ @Test @DisplayName("Verify that another user can read a group-controlled resource") default void testOtherUserCanReadGroupResource() { try (final Response res = target(getGroupContainer()).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 cannot read the child of a default ACL resource. */ @Test @DisplayName("Verify that another user cannot read the child of a default ACL resource") default void testOtherUserCanReadDefaultAclResourceChild() { try (final Response res = target(getDefaultContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot control a public resource. */ @Test @DisplayName("Verify that another user cannot control a public resource") default void testOtherUserCanControlPublicResource() { try (final Response res = target(getPublicContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot control a group-controlled resource. */ @Test @DisplayName("Verify that another user cannot control a group-controlled resource") default void testOtherUserCanControlGroupResource() { try (final Response res = target(getGroupContainer() + 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 group-controlled resource. */ @Test @DisplayName("Verify that another user cannot write to a group-controlled resource") default void testOtherUserCanWriteGroupResource() { try (final Response res = target(getGroupContainer()).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); } }
/** * Verify that another user cannot write to the child of a default ACL resource. */ @Test @DisplayName("Verify that another user cannot write to the child of a default ACL resource") default void testOtherUserCanWriteDefaultAclResourceChild() { try (final Response res = target(getDefaultContainerChild()).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 protected resource. */ @Test @DisplayName("Verify that another user cannot write to the child of a protected resource") default void testOtherUserCanWriteProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that another user cannot write to a group-controlled resource. */ @Test @DisplayName("Verify that another user cannot write to a group-controlled resource") default void testOtherUserCanWriteGroupResource() { try (final Response res = target(getGroupContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }