Offer update info link only, when feed url is specified

This commit is contained in:
René Pfeuffer
2020-09-24 11:48:31 +02:00
parent 6a80cce87a
commit 1bf70fd655

View File

@@ -102,7 +102,9 @@ public class IndexDtoGenerator extends HalAppenderMapper {
}
if (ConfigurationPermissions.list().isPermitted()) {
builder.single(link("config", resourceLinks.config().self()));
builder.single(link("updateInfo", resourceLinks.adminInfo().updateInfo()));
if (!Strings.isNullOrEmpty(configuration.getReleaseFeedUrl())) {
builder.single(link("updateInfo", resourceLinks.adminInfo().updateInfo()));
}
}
builder.single(link("repositories", resourceLinks.repositoryCollection().self()));
builder.single(link("namespaces", resourceLinks.namespaceCollection().self()));