Skip to content

Commit

Permalink
Merge pull request #511 from shnrndk/temp2
Browse files Browse the repository at this point in the history
Fixed publish button is disabled when only mutual ssl is enabled
  • Loading branch information
piyumaldk authored Jan 4, 2024
2 parents fce82b3 + 50e1be7 commit 42d9c6a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ class LifeCycleUpdate extends Component {
lcMap.set('Created', 'Create');
lcMap.set('Retired', 'Retire');
const isMutualSSLEnabled = api.securityScheme.includes(API_SECURITY_MUTUAL_SSL_MANDATORY);
const isMutualSslOnly = api.securityScheme.length === 2 && api.securityScheme.includes('mutualssl')
&& api.securityScheme.includes(API_SECURITY_MUTUAL_SSL_MANDATORY);
const isAppLayerSecurityMandatory = api.securityScheme.includes(
API_SECURITY_OAUTH_BASIC_AUTH_API_KEY_MANDATORY,
);
Expand All @@ -298,7 +300,7 @@ class LifeCycleUpdate extends Component {
}
if (lifecycleState.event === 'Publish') {
const buttonDisabled = (isMutualSSLEnabled && !isCertAvailable)
|| (deploymentsAvailable && !isBusinessPlanAvailable)
|| (!isMutualSslOnly && deploymentsAvailable && !isBusinessPlanAvailable)
|| (isAPIProduct && !isBusinessPlanAvailable)
|| (deploymentsAvailable && !isMandatoryPropertiesAvailable);
// When business plans are not assigned and deployments available
Expand Down

0 comments on commit 42d9c6a

Please sign in to comment.