diff options
author | Sai Gandham <sai.gandham@att.com> | 2019-07-12 22:26:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-12 22:26:30 +0000 |
commit | f918e038f8f4eea2fb879edf704683877bc19849 (patch) | |
tree | 6eb10de329001f74401e8d2cae1fa33a35079d19 /auth/auth-cass/src | |
parent | 3c06c9887d6f88524f06b46f2593f6eef640826b (diff) | |
parent | 1338680ef142f9a33ee32a00b07c7d2ae658cb3a (diff) |
Merge "Adjust Agent for none K8s"
Diffstat (limited to 'auth/auth-cass/src')
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java | 10 | ||||
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java index 37501967..d64cff29 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java @@ -265,6 +265,16 @@ public class CredDAO extends CassDAOImpl<AuthzTrans,CredDAO.Data> { hd.memo = memo ? String.format("%s by %s", override[0], hd.user) : (modified.name() + "d credential for " + data.id); + String spacer = ": "; + if(data.notes!=null) { + hd.memo+=spacer + data.notes; + spacer = ", "; + } + + if(data.tag!=null) { + hd.memo+=spacer + data.tag; + } + // Detail? if (modified==CRUD.delete) { try { diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java index 3abad1a5..22b14cb4 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java @@ -1178,9 +1178,9 @@ public class Question { } public boolean isAdmin(AuthzTrans trans, String user, String ns) { - Date now = new Date(); Result<List<UserRoleDAO.Data>> rur = userRoleDAO.read(trans, user,ns+DOT_ADMIN); if (rur.isOKhasData()) { + Date now = new Date(); for (UserRoleDAO.Data urdd : rur.value){ if (urdd.expires.after(now)) { return true; @@ -1192,8 +1192,8 @@ public class Question { public boolean isOwner(AuthzTrans trans, String user, String ns) { Result<List<UserRoleDAO.Data>> rur = userRoleDAO.read(trans, user,ns+DOT_OWNER); - Date now = new Date(); if (rur.isOKhasData()) {for (UserRoleDAO.Data urdd : rur.value){ + Date now = new Date(); if (urdd.expires.after(now)) { return true; } |