From c9cd051a6b63d27b0d53a89aaa007a5cebb49f91 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 27 May 2016 02:20:15 +0530 Subject: [PATCH] subscribed to super tenant apis --- .../extension/APIManagementProviderServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java index 8d9052964ae..30f8d62d436 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java @@ -410,6 +410,9 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe int applicationId = createApplication(apiConsumer, apiApplicationName, username, groupId); String tenantDomain = MultitenantUtils.getTenantDomain(username); Set userVisibleAPIs = apiConsumer.getAllPublishedAPIs(tenantDomain); + if (!tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) { + userVisibleAPIs.addAll(apiConsumer.getAllPublishedAPIs(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)); + } Subscriber subscriber = apiConsumer.getSubscriber(username); Set subscribedAPIs = apiConsumer.getSubscribedAPIs(subscriber); for (API visibleApi : userVisibleAPIs) {