From 50e1be7587cf255cbe7e87f2be9f61ccda3ba773 Mon Sep 17 00:00:00 2001 From: shnrndk Date: Wed, 4 Oct 2023 14:07:42 +0530 Subject: [PATCH] Fixed publish button is disabled when only mutual ssl is enabled --- .../app/components/Apis/Details/LifeCycle/LifeCycleUpdate.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/LifeCycle/LifeCycleUpdate.jsx b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/LifeCycle/LifeCycleUpdate.jsx index 7ea1eee7296..ee27cafde75 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/LifeCycle/LifeCycleUpdate.jsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/LifeCycle/LifeCycleUpdate.jsx @@ -277,6 +277,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, ); @@ -297,7 +299,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