summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
Diffstat (limited to 'cadi')
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java7
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLur.java6
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java9
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java2
4 files changed, 16 insertions, 8 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java
index e48ae169..ace2c73f 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AAFLurPerm.java
@@ -119,7 +119,12 @@ public class AAFLurPerm extends AbsAAFLur<AAFPermission> {
@Override
public User<AAFPermission> code(Rcli<?> client) throws CadiException, ConnectException, APIException {
final long remoteStart = System.nanoTime();
- Future<Perms> fp = client.read("/authz/perms/user/"+name,aaf.permsDF);
+ StringBuilder sb = new StringBuilder("/authz/perms/user/");
+ sb.append(name);
+ if(details) {
+ sb.append("?force");
+ }
+ Future<Perms> fp = client.read(sb.toString(),aaf.permsDF);
// In the meantime, lookup User, create if necessary
User<AAFPermission> user = getUser(principal);
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLur.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLur.java
index cfecc533..34c55cee 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLur.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/v2_0/AbsAAFLur.java
@@ -43,6 +43,7 @@ public abstract class AbsAAFLur<PERM extends Permission> extends AbsUserCache<PE
public AAFCon<?> aaf;
public Lur preemptiveLur=null; // Initial Use is for OAuth2, preemptive Lur
private String[] supports;
+ protected boolean details;
public AbsAAFLur(AAFCon<?> con) throws APIException {
super(con.access, con.cleanInterval, con.highCount, con.usageRefreshTriggerCount);
@@ -62,7 +63,12 @@ public abstract class AbsAAFLur<PERM extends Permission> extends AbsUserCache<PE
public void setDebug(String ids) {
this.debug = ids==null?null:Split.split(',', ids);
}
+
+ public void details(boolean on) {
+ details = on;
+ }
+
public void setPreemptiveLur(Lur preemptive) {
this.preemptiveLur = preemptive;
}
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
index fac6a3f1..994e3250 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
@@ -108,7 +108,6 @@ public class PropAccess implements Access {
protected synchronized void init(Properties p) {
// Make sure these two are set before any changes in Logging
name = "cadi";
- level=DEFAULT.maskOf();
props = new Properties();
// First, load related System Properties
@@ -127,16 +126,14 @@ public class PropAccess implements Access {
// Preset LogLevel
String sLevel = props.getProperty(Config.CADI_LOGLEVEL);
- if (sLevel!=null) {
- level=Level.valueOf(sLevel).maskOf();
- }
-
// Third, load any Chained Property Files
load(props.getProperty(Config.CADI_PROP_FILES));
if(sLevel==null) { // if LogLev wasn't set before, check again after Chained Load
sLevel = props.getProperty(Config.CADI_LOGLEVEL);
- if (sLevel!=null) {
+ if (sLevel==null) {
+ level=DEFAULT.maskOf();
+ } else {
level=Level.valueOf(sLevel).maskOf();
}
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java
index c87b9c32..8333db53 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java
@@ -73,7 +73,7 @@ public class JU_GetAccess {
@SuppressWarnings("unused")
GetAccess getAccess = new GetAccess(accessGet);
String[] lines = outStream.toString().split(System.lineSeparator());
- assertThat(lines.length, is(6));
+ assertThat(lines.length, is(5));
output = lines[0].split(" ", 2)[1];
}