From 42a587904f9163f4d8c6bebfe21541970921a0bc Mon Sep 17 00:00:00 2001 From: Milan Perera Date: Fri, 6 Jan 2017 16:10:52 +0530 Subject: [PATCH] Fixed issues in permission-scope mapping --- .../lifecycle/util/AnnotationProcessor.java | 6 +- .../permission/AnnotationProcessor.java | 7 +- .../devicemgt/app/conf/config.json | 125 +++++++++++------- pom.xml | 2 +- 4 files changed, 89 insertions(+), 51 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java index e27c3edbe8..b820a4426f 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java @@ -66,6 +66,8 @@ public class AnnotationProcessor { private static final String SWAGGER_ANNOTATIONS_PROPERTIES_VALUE = "value"; private static final String ANNOTATIONS_SCOPES = "scopes"; + private static final String PERMISSION_PREFIX = "/permission/admin"; + private StandardContext context; private Method[] pathClazzMethods; @@ -201,8 +203,9 @@ public class AnnotationProcessor { Scope scope; String permissions[]; - StringBuilder aggregatedPermissions = new StringBuilder(); + StringBuilder aggregatedPermissions; for(int i=0; i pathClazz; @@ -391,8 +393,9 @@ public class AnnotationProcessor { Scope scope; String permissions[]; - StringBuilder aggregatedPermissions = new StringBuilder(); + StringBuilder aggregatedPermissions; for(int i=0; i[2.6.0,3.0.0) - 6.1.30-SNAPSHOT + 6.1.35 (6.0.0,7.0.0]