/** * Verify that an anonymous user cannot append to a group-controlled resource. */ @Test @DisplayName("Verify that an anonymous user cannot append to a group-controlled resource") default void testUserCanAppendGroupResource() { try (final Response res = target(getGroupContainer()).request().post(entity("", TEXT_TURTLE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot append to a default ACL resource. */ @Test @DisplayName("Verify that an anonymous user cannot append to a default ACL resource") default void testUserCanAppendDefaultAclResource() { try (final Response res = target(getDefaultContainer()).request().post(entity("", TEXT_TURTLE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a public resource") default void testCanControlPublicResourceChild() { try (final Response res = target(getPublicContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a protected resource") default void testCanControlProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control a group-controlled resource. */ @Test @DisplayName("Verify that an anonymous user cannot control a group-controlled resource") default void testCanControlGroupResource() { try (final Response res = target(getGroupContainer() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that a user cannot control the child of a default ACL resource. */ @Test @DisplayName("Verify that a user cannot control the child of a default ACL resource") default void testCanControlDefaultAclResourceChild() { try (final Response res = target(getDefaultContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } } }
/** * Verify that an anonymous user can read the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user can read the child of a public resource") default void testCanReadPublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request().get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that an anonymous user cannot control a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot control a public resource") default void testCanControlPublicResource() { try (final Response res = target(getPublicContainer() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot read a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot read a protected resource") default void testCanReadProtectedResource() { try (final Response res = target(getProtectedContainer()).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user can read a public resource. */ @Test @DisplayName("Verify that an anonymous user can read a public resource") default void testCanReadPublicResource() { try (final Response res = target(getPublicContainer()).request().get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that an anonymous user cannot control a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot control a protected resource") default void testCanControlProtectedResource() { try (final Response res = target(getProtectedContainer() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot read the child of a private resource. */ @Test @DisplayName("Verify that an anonymous user cannot read the child of a private resource") default void testCanReadPrivateResourceChild() { try (final Response res = target(getPrivateContainerChild()).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot read the child of a group-controlled resource. */ @Test @DisplayName("Verify that an anonymous user cannot read the child of a group-controlled resource") default void testCanReadGroupResourceChild() { try (final Response res = target(getGroupContainerChild()).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a public resource") default void testCanControlPublicResourceChild() { try (final Response res = target(getPublicContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user can read a non-inheriting ACL resource. */ @Test @DisplayName("Verify that an anonymous user can read a non-inheriting ACL resource") default void testCanReadDefaultAclResource() { try (final Response res = target(getDefaultContainer()).request().get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that an anonymous user cannot write to a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to a public resource") default void testCanWritePublicResource() { try (final Response res = target(getPublicContainer()).request().method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot write to a private resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to a private resource") default void testCanWritePrivateResource() { try (final Response res = target(getPrivateContainer()).request().method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot write to the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to the child of a public resource") default void testCanWritePublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request().method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot write to a group-controlled resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to a group-controlled resource") default void testCanWriteGroupResource() { try (final Response res = target(getGroupContainer()).request().method(PATCH, entity(INSERT_PROP_FOO, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot write to a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to a protected resource") default void testCanWriteProtectedResource() { try (final Response res = target(getProtectedContainer()).request().method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }