Merge "Annotate the "Visitor" interface with the @FunctionalInterface annotation"
[aaf/authz.git] / auth / auth-service / src / main / java / org / onap / aaf / auth / service / api / API_Perms.java
index 5f2a823..04654d4 100644 (file)
@@ -55,7 +55,7 @@ public class API_Perms {
                 
                 String scopes = req.getParameter("scopes");
                 Result<Void> r;
-                if(scopes==null) {
+                if (scopes==null) {
                     r = context.getPermsByUser(trans, resp, pathParam(req, "user"));
                 } else {
                     r = context.getPermsByUserScope(trans, resp, pathParam(req, "user"),Split.split(':', scopes));
@@ -232,8 +232,10 @@ public class API_Perms {
                     HttpServletRequest req,
                     HttpServletResponse resp) throws Exception {
                 
-                Result<Void> r = context.renamePerm(trans, req, resp, pathParam(req, "type"), 
-                        pathParam(req, "instance"), pathParam(req, "action"));
+                Result<Void> r = context.renamePerm(trans, req, resp, 
+                        pathParam(req, "type"), 
+                        URLDecoder.decode(pathParam(req, "instance"),Config.UTF_8), 
+                        pathParam(req, "action"));
                 switch(r.status) {
                     case OK: 
                         resp.setStatus(HttpStatus.OK_200);