Remove client side validation on save for OAuth Datasource (#3131)

This commit is contained in:
Piyush 2021-02-25 12:01:21 +05:30 committed by GitHub
parent 3944d7e43e
commit 8383d79c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,22 +228,6 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
const { formData } = this.props;
if (!formData) return true;
if (!formData.url) return true;
if (formData.authType === AuthType.OAuth2) {
const { authentication } = formData;
// weird state, wait for state to get fixed
if (!authentication) return true;
if (
[GrantType.ClientCredentials, GrantType.AuthorizationCode].includes(
authentication.grantType,
)
) {
if (!authentication.accessTokenUrl) return true;
if (!authentication.clientId) return true;
}
if (authentication.grantType === GrantType.AuthorizationCode) {
if (!authentication.authorizationUrl) return true;
}
}
return false;
};