From a4870b48cf24641b9ff1135fb0ffcec9b3b2b58c 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 d21b79fca43e..da1233a3d624 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; }