Commit 86aacc07ae70206c55083c3d2293f350d60de792
1 parent
1f3bae92
Set default value to 'false' for 'isOAuth2ConfigAllowed'
Showing
2 changed files
with
2 additions
and
2 deletions
@@ -129,7 +129,7 @@ public class OAuth2ServiceImpl extends AbstractEntityService implements OAuth2Se | @@ -129,7 +129,7 @@ public class OAuth2ServiceImpl extends AbstractEntityService implements OAuth2Se | ||
129 | if (tenant == null) return false; | 129 | if (tenant == null) return false; |
130 | JsonNode allowOAuth2ConfigurationJsonNode = tenant.getAdditionalInfo() != null ? tenant.getAdditionalInfo().get(ALLOW_OAUTH2_CONFIGURATION) : null; | 130 | JsonNode allowOAuth2ConfigurationJsonNode = tenant.getAdditionalInfo() != null ? tenant.getAdditionalInfo().get(ALLOW_OAUTH2_CONFIGURATION) : null; |
131 | if (allowOAuth2ConfigurationJsonNode == null) { | 131 | if (allowOAuth2ConfigurationJsonNode == null) { |
132 | - return true; | 132 | + return false; |
133 | } else { | 133 | } else { |
134 | return allowOAuth2ConfigurationJsonNode.asBoolean(); | 134 | return allowOAuth2ConfigurationJsonNode.asBoolean(); |
135 | } | 135 | } |
@@ -66,7 +66,7 @@ public class BaseOAuth2ServiceTest extends AbstractServiceTest { | @@ -66,7 +66,7 @@ public class BaseOAuth2ServiceTest extends AbstractServiceTest { | ||
66 | @Test | 66 | @Test |
67 | public void testIsOAuth2Allowed_null() throws IOException { | 67 | public void testIsOAuth2Allowed_null() throws IOException { |
68 | updateTenantAllowOAuth2Setting(null); | 68 | updateTenantAllowOAuth2Setting(null); |
69 | - Assert.assertTrue(oAuth2Service.isOAuth2ClientRegistrationAllowed(tenantId)); | 69 | + Assert.assertFalse(oAuth2Service.isOAuth2ClientRegistrationAllowed(tenantId)); |
70 | } | 70 | } |
71 | 71 | ||
72 | @Test | 72 | @Test |