X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cmd%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fcmd%2Frole%2FListByUser.java;h=9657721a9faaba89a5b8f339447dd8d79fe1e556;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=8111fedc07364864c74847a70b7ff498b6039ea5;hpb=3d1706fcbe7f95830ff6fd23cf679ee55c6d0595;p=aaf%2Fauthz.git diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java index 8111fedc..9657721a 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/ListByUser.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,17 +50,17 @@ import aaf.v2_0.UserRoles; */ public class ListByUser extends Cmd { private static final String HEADER = "List Roles for User "; - + public ListByUser(List parent) { - super(parent,"user", + super(parent,"user", new Param("id",true), - new Param("detail", false)); + new Param("detail", false)); } @Override public int _exec( int idx, final String ... args) throws CadiException, APIException, LocatorException { final String user=fullID(args[idx]); - + return same(new Retryable() { @Override @@ -84,7 +84,7 @@ public class ListByUser extends Cmd { if (aafcli.isDetailed()) { roles = new Roles(); Future fp = client.read( - "/authz/perms/user/"+user+"?ns&force", + "/authz/perms/user/"+user+"?ns&force", getDF(Perms.class) ); if (fp.get(AAFcli.timeout())) { @@ -108,7 +108,7 @@ public class ListByUser extends Cmd { r.getPerms().add(p); } } - } + } code = fp.code(); } else { roles = new Roles(); @@ -120,14 +120,14 @@ public class ListByUser extends Cmd { lr.add(r); } } - - + + ((List)parent).report(roles,perms,urs,HEADER,user); return code; } }); } - + @Override public void detailedHelp(int indent, StringBuilder sb) { detailLine(sb,indent,HEADER);