sureshanaparti commented on code in PR #12702:
URL: https://github.com/apache/cloudstack/pull/12702#discussion_r3000086546
##########
plugins/user-authenticators/oauth2/src/main/java/org/apache/cloudstack/oauth2/api/command/ListOAuthProvidersCmd.java:
##########
@@ -107,9 +142,10 @@ public String authenticate(String command, Map<String,
Object[]> params, HttpSes
}
List<OauthProviderResponse> responses = new ArrayList<>();
for (OauthProviderVO result : resultList) {
+ Domain domain = result.getDomainId() != null ?
ApiDBUtils.findDomainById(result.getDomainId()) : null;
OauthProviderResponse r = new
OauthProviderResponse(result.getUuid(), result.getProvider(),
- result.getDescription(), result.getClientId(),
result.getSecretKey(), result.getRedirectUri());
- if (OAuth2AuthManager.OAuth2IsPluginEnabled.value() &&
authenticatorPluginNames.contains(result.getProvider()) && result.isEnabled()) {
+ result.getDescription(), result.getClientId(),
result.getSecretKey(), result.getRedirectUri(), domain);
+ if
(Boolean.TRUE.equals(OAuth2AuthManager.OAuth2IsPluginEnabled.valueInScope(ConfigKey.Scope.Domain,
result.getDomainId(), true)) &&
authenticatorPluginNames.contains(result.getProvider()) && result.isEnabled()) {
Review Comment:
when domain not passed, check for global value only -
_OAuth2AuthManager.OAuth2IsPluginEnabled.value()_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]