Commit 86aacc07ae70206c55083c3d2293f350d60de792

Authored by vzikratyi
1 parent 1f3bae92

Set default value to 'false' for 'isOAuth2ConfigAllowed'

... ... @@ -129,7 +129,7 @@ public class OAuth2ServiceImpl extends AbstractEntityService implements OAuth2Se
129 129 if (tenant == null) return false;
130 130 JsonNode allowOAuth2ConfigurationJsonNode = tenant.getAdditionalInfo() != null ? tenant.getAdditionalInfo().get(ALLOW_OAUTH2_CONFIGURATION) : null;
131 131 if (allowOAuth2ConfigurationJsonNode == null) {
132   - return true;
  132 + return false;
133 133 } else {
134 134 return allowOAuth2ConfigurationJsonNode.asBoolean();
135 135 }
... ...
... ... @@ -66,7 +66,7 @@ public class BaseOAuth2ServiceTest extends AbstractServiceTest {
66 66 @Test
67 67 public void testIsOAuth2Allowed_null() throws IOException {
68 68 updateTenantAllowOAuth2Setting(null);
69   - Assert.assertTrue(oAuth2Service.isOAuth2ClientRegistrationAllowed(tenantId));
  69 + Assert.assertFalse(oAuth2Service.isOAuth2ClientRegistrationAllowed(tenantId));
70 70 }
71 71
72 72 @Test
... ...