From bff9dc9e7332bb4ca3e86d5dc3403eae94387645 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Mon, 14 Oct 2024 21:41:24 +0530 Subject: [PATCH] Remove api policy enabled check --- .../carbon/apimgt/impl/APIProviderImpl.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java index 5f4d5d950f3c..22b03f61d320 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java @@ -5315,17 +5315,16 @@ public API addPolicyTypeFieldToApi(API api, String tenantDomain) } api.setUriTemplates(uriTemplates); - if (isAPILevelPolicySupportEnabled) { - List apiPolicies = api.getApiPolicies(); - if (apiPolicies != null && !apiPolicies.isEmpty()) { - for (OperationPolicy policy : apiPolicies) { - String policyType = getPolicyType(policy, api.getUuid(), - tenantDomain); - policy.setPolicyType(policyType); - } + List apiPolicies = api.getApiPolicies(); + if (apiPolicies != null && !apiPolicies.isEmpty()) { + for (OperationPolicy policy : apiPolicies) { + String policyType = getPolicyType(policy, api.getUuid(), + tenantDomain); + policy.setPolicyType(policyType); } - api.setApiPolicies(apiPolicies); } + api.setApiPolicies(apiPolicies); + return api; }