diff options
author | Antoine Vigneau <antoine.vigneau@sonarsource.com> | 2023-05-04 14:58:54 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-05-11 20:03:14 +0000 |
commit | 965d66bb3385fc196ba867e5ccabbe23a574ca39 (patch) | |
tree | 10cf16bdc900c0c1952282680001bc502bf83a85 /server/sonar-webserver-core/src/main/java | |
parent | bfacb4c8eab9949a52afb6e467504c6afb150a31 (diff) | |
download | sonarqube-965d66bb3385fc196ba867e5ccabbe23a574ca39.tar.gz sonarqube-965d66bb3385fc196ba867e5ccabbe23a574ca39.zip |
SONAR-19084 Return GitHub as provider managing the instance in system/info
Diffstat (limited to 'server/sonar-webserver-core/src/main/java')
3 files changed, 4 insertions, 10 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/CommonSystemInformation.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/CommonSystemInformation.java index 40629019e54..8789f0f5ca2 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/CommonSystemInformation.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/CommonSystemInformation.java @@ -70,15 +70,9 @@ public class CommonSystemInformation { .toList(); } - public String getManagedProvider() { + public String getManagedInstanceProviderName() { if (managedInstanceService.isInstanceExternallyManaged()) { - return identityProviderRepository.getAllEnabledAndSorted() - .stream() - .filter(provider -> provider.getKey().equalsIgnoreCase("saml")) - .filter(IdentityProvider::isEnabled) - .findFirst() - .map(IdentityProvider::getName) - .orElse(null); + return managedInstanceService.getProviderName(); } return null; } diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java index c238e175deb..c7f433985ef 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/StandaloneSystemSection.java @@ -91,7 +91,7 @@ public class StandaloneSystemSection extends BaseSectionMBean implements SystemS setAttribute(protobuf, "Edition", sonarRuntime.getEdition().getLabel()); setAttribute(protobuf, NCLOC.getName(), statisticsSupport.getLinesOfCode()); setAttribute(protobuf, "Docker", dockerSupport.isRunningInDocker()); - setAttribute(protobuf, "External Users and Groups Provisioning", commonSystemInformation.getManagedProvider()); + setAttribute(protobuf, "External Users and Groups Provisioning", commonSystemInformation.getManagedInstanceProviderName()); setAttribute(protobuf, "External User Authentication", commonSystemInformation.getExternalUserAuthentication()); addIfNotEmpty(protobuf, "Accepted external identity providers", commonSystemInformation.getEnabledIdentityProviders()); diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSection.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSection.java index 31b3cbb7798..308b1733c1d 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSection.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSection.java @@ -62,7 +62,7 @@ public class GlobalSystemSection implements SystemInfoSection, Global { setAttribute(protobuf, "Docker", dockerSupport.isRunningInDocker()); setAttribute(protobuf, "High Availability", true); setAttribute(protobuf, "External Users and Groups Provisioning", - commonSystemInformation.getManagedProvider()); + commonSystemInformation.getManagedInstanceProviderName()); setAttribute(protobuf, "External User Authentication", commonSystemInformation.getExternalUserAuthentication()); addIfNotEmpty(protobuf, "Accepted external identity providers", |