summaryrefslogtreecommitdiffstats
path: root/auth/auth-cmd
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cmd')
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java2
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java9
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java2
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java2
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java8
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java4
6 files changed, 16 insertions, 11 deletions
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java
index 12cf0635..49ffb51b 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Help.java
@@ -31,7 +31,7 @@ public class Help extends Cmd {
private List<Cmd> cmds;
public Help(AAFcli aafcli, List<Cmd> cmds) {
- super(aafcli, "--help",
+ super(aafcli, "help",
new Param("-d (more details)", false),
new Param("command",false));
this.cmds = cmds;
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java
index 1b1b1831..d4a82d5d 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/Version.java
@@ -27,17 +27,18 @@ import org.onap.aaf.cadi.config.Config;
import org.onap.aaf.misc.env.APIException;
public class Version extends Cmd {
+ private final String version;
-
- public Version(AAFcli aafcli) {
- super(aafcli, "--version");
+ public Version(AAFcli aafcli) {
+ super(aafcli, "version");
+ version = aafcli.access.getProperty(Config.AAF_DEPLOYED_VERSION, Config.AAF_DEFAULT_API_VERSION);
}
@Override
protected int _exec(int idx, String... args) throws CadiException, APIException, LocatorException {
pw().println("AAF Command Line Tool");
pw().print("Version: ");
- pw().println(Config.AAF_DEFAULT_API_VERSION);
+ pw().println(version);
return 200;
}
}
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java
index eadf1c97..d6eb9b30 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersContact.java
@@ -117,7 +117,7 @@ public class ListUsersContact extends Cmd {
indent+=4;
detailLine(sb,indent,"Report Users associated with this Namespace's Roles");
sb.append('\n');
- detailLine(sb,indent,"If \"set details=true\" is specified, then all roles are printed ");
+ detailLine(sb,indent,"If \"details\" is specified, then all roles are printed ");
detailLine(sb,indent,"with the associated users and expiration dates");
indent-=4;
api(sb,indent,HttpMethods.GET,"authz/nss/<ns>",Nss.class,true);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java
index c0838cb7..b33f506d 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/ns/ListUsersInRole.java
@@ -117,7 +117,7 @@ public class ListUsersInRole extends Cmd {
indent+=4;
detailLine(sb,indent,"Report Users associated with this Namespace's Roles");
sb.append('\n');
- detailLine(sb,indent,"If \"set details=true\" is specified, then all roles are printed ");
+ detailLine(sb,indent,"If \"details\" is specified, then all roles are printed ");
detailLine(sb,indent,"with the associated users and expiration dates");
indent-=4;
api(sb,indent,HttpMethods.GET,"authz/nss/<ns>",Nss.class,true);
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java
index 0f0c0011..3edc0e59 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Delete.java
@@ -59,8 +59,12 @@ public class Delete extends Cmd {
pk.setInstance(args[idx++]);
pk.setAction(args[idx++]);
- // Set "Force" if set
- setQueryParamsOn(client);
+ if(pk.getType().contains("@")) { // User Perm deletion... Must remove from hidden role
+ client.setQueryParams("force");
+ } else {
+ // Set "Force" if set
+ setQueryParamsOn(client);
+ }
Future<PermRequest> fp = client.delete(
"/authz/perm",
getDF(PermRequest.class),
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java
index 325f45db..00972a18 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/ListByUser.java
@@ -57,9 +57,9 @@ public class ListByUser extends Cmd {
}
if (aafcli.isDetailed()) {
if (sb==null) {
- sb = new StringBuilder('?');
+ sb = new StringBuilder("?");
} else {
- sb.append('&');
+ sb.append("&");
}
sb.append("ns");
}