From de963fa01b25dcf9efb9d98075076e0cf085cce5 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Fri, 24 Sep 2021 15:38:07 +0530 Subject: [PATCH] updating existing shared scope not required --- .../apimgt/webapp/publisher/APIPublisherServiceImpl.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java index 3efc98ddb1..99d187b2f4 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java @@ -135,14 +135,6 @@ public class APIPublisherServiceImpl implements APIPublisherService { scope.setRoles(apiScope.getRoles()); apiProvider.addSharedScope(scope, tenantDomain); } - } else { - // if already available as shared scope -> update - Scope scope = new Scope(); - scope.setName(apiScope.getName()); - scope.setDescription(apiScope.getDescription()); - scope.setKey(apiScope.getKey()); - scope.setRoles(apiScope.getRoles()); - apiProvider.updateSharedScope(scope, tenantDomain); } }