mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
cleanup
This commit is contained in:
@@ -53,6 +53,7 @@ class AnonymousAccessITCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldRejectRepositoryResourceWithoutAuthentication() {
|
void shouldRejectRepositoryResourceWithoutAuthentication() {
|
||||||
|
setAnonymousAccess(false);
|
||||||
assertEquals(401, RestAssured.given()
|
assertEquals(401, RestAssured.given()
|
||||||
.when()
|
.when()
|
||||||
.get(RestUtil.REST_BASE_URL.resolve("repositories/"))
|
.get(RestUtil.REST_BASE_URL.resolve("repositories/"))
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ class V1RepositoryHelper {
|
|||||||
Optional<File> file = resolveV1File(contextProvider, filename);
|
Optional<File> file = resolveV1File(contextProvider, filename);
|
||||||
if (file.isPresent()) {
|
if (file.isPresent()) {
|
||||||
Object unmarshal = jaxbContext.createUnmarshaller().unmarshal(file.get());
|
Object unmarshal = jaxbContext.createUnmarshaller().unmarshal(file.get());
|
||||||
if (unmarshal instanceof V1RepositoryHelper.V1RepositoryDatabase) {
|
if (unmarshal instanceof V1RepositoryDatabase) {
|
||||||
return of((V1RepositoryHelper.V1RepositoryDatabase) unmarshal);
|
return of((V1RepositoryDatabase) unmarshal);
|
||||||
} else {
|
} else {
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user