/** * Verify that a user can append to a protected resource. */ @Test @DisplayName("Verify that a user can append to a protected resource") default void testUserCanAppendProtectedResource() { try (final Response res = target(getProtectedContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user can read a non-inheritable ACL resource. */ @Test @DisplayName("Verify that a user can read a non-inheritable ACL resource") default void testUserCanReadDefaultAclResource() { try (final Response res = target(getDefaultContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot read the child of a non-inheritable ACL resource. */ @Test @DisplayName("Verify that a user cannot read the child of a non-inheritable ACL resource") default void testUserCannotReadDefaultAclResourceChild() { try (final Response res = target(getDefaultContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can append to a public resource. */ @Test @DisplayName("Verify that a user can append to a public resource") default void testUserCanAppendPublicResource() { try (final Response res = target(getPublicContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot append to a private resource. */ @Test @DisplayName("Verify that a user cannot append to a private resource") default void testUserCannotAppendPrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can read the child of a group-controlled resource. */ @Test @DisplayName("Verify that a user can read the child of a group-controlled resource") default void testUserCanReadGroupResourceChild() { try (final Response res = target(getGroupContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot control a group-controlled resource. */ @Test @DisplayName("Verify that a user cannot control a group-controlled resource") default void testUserCannotControlGroupResource() { try (final Response res = target(getGroupContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can read the child of a public resource. */ @Test @DisplayName("Verify that a user can read the child of a public resource") default void testUserCanReadPublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot control the child of a protected resource. */ @Test @DisplayName("Verify that a user cannot control the child of a protected resource") default void testUserCannotControlProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user cannot control the child of a private resource. */ @Test @DisplayName("Verify that a user cannot control the child of a private resource") default void testUserCannotControlPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can append to a public resource. */ @Test @DisplayName("Verify that a user can append to a public resource") default void testUserCanAppendPublicResource() { try (final Response res = target(getPublicContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).post(entity("", TEXT_TURTLE))) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot control a private resource. */ @Test @DisplayName("Verify that a user cannot control a private resource") default void testUserCannotControlPrivateResource() { try (final Response res = target(getPrivateContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user cannot control the child of a group-controlled resource. */ @Test @DisplayName("Verify that a user cannot control the child of a group-controlled resource") default void testUserCannotControlGroupResourceChild() { try (final Response res = target(getGroupContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can read a group-controlled resource. */ @Test @DisplayName("Verify that a user can read a group-controlled resource") default void testUserCanReadGroupResource() { try (final Response res = target(getGroupContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot control the child of a public resource. */ @Test @DisplayName("Verify that a user cannot control the child of a public resource") default void testUserCannotControlPublicResourceChild() { try (final Response res = target(getPublicContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can read the child of a protected resource. */ @Test @DisplayName("Verify that a user can read the child of a protected resource") default void testUserCanReadProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user cannot control the child of a private resource. */ @Test @DisplayName("Verify that a user cannot control the child of a private resource") default void testUserCannotControlPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user cannot control a protected resource. */ @Test @DisplayName("Verify that a user cannot control a protected resource") default void testUserCannotControlProtectedResource() { try (final Response res = target(getProtectedContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user cannot control a public resource. */ @Test @DisplayName("Verify that a user cannot control a public resource") default void testUserCannotControlPublicResource() { try (final Response res = target(getPublicContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user cannot read a private resource. */ @Test @DisplayName("Verify that a user cannot read a private resource") default void testUserCannotReadPrivateResource() { try (final Response res = target(getPrivateContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }