/** * Verify that a user cannot control a non-inheritable ACL resource. */ @Test @DisplayName("Verify that a user cannot control a non-inheritable ACL resource") default void testUserCannotControlDefaultAclResource() { try (final Response res = target(getDefaultContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_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 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 control a non-inheritable ACL resource. */ @Test @DisplayName("Verify that a user cannot control a non-inheritable ACL resource") default void testUserCannotControlDefaultAclResource() { try (final Response res = target(getDefaultContainer() + EXT_ACL).request() .header(AUTHORIZATION, getAuthorizationHeader()).get()) { assertEquals(FORBIDDEN, fromStatusCode(res.getStatus()), FORBIDDEN_RESPONSE); } }
/** * Verify that a user can write to a non-inheritable ACL resource. */ @Test @DisplayName("Verify that a user can write to a non-inheritable ACL resource") default void testUserCanWriteDefaultAclResource() { try (final Response res = target(getDefaultContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that a user can write to a non-inheritable ACL resource. */ @Test @DisplayName("Verify that a user can write to a non-inheritable ACL resource") default void testUserCanWriteDefaultAclResource() { try (final Response res = target(getDefaultContainer()).request() .header(AUTHORIZATION, getAuthorizationHeader()) .method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }