X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-gui%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fgui%2Fpages%2FApprovalForm.java;h=cb868b16c5c8a52d3b89dc8c3ac54e50ac2db558;hb=3d1706fcbe7f95830ff6fd23cf679ee55c6d0595;hp=e047a22a3fcb61f427f5919e7ad344768925e39f;hpb=57effd69fb15e0c73f85296d10ff6b358a6cbebb;p=aaf%2Fauthz.git diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApprovalForm.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApprovalForm.java index e047a22a..cb868b16 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApprovalForm.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/ApprovalForm.java @@ -121,7 +121,7 @@ public class ApprovalForm extends Page { private static final String[] headers = new String[] {"Identity","Request","Approve","Deny"}; private Slot sUser; private Slot sAsDelegate; - private Slot sAsUser; + private Slot sAsUser; public Model(AuthzEnv env) { sUser = env.slot(NAME+".user"); @@ -141,9 +141,9 @@ public class ApprovalForm extends Page { final String asDelegate = trans.get(sAsDelegate, null); final String approver; if(asDelegate==null) { - approver = trans.get(sAsUser,trans.user()); + approver = trans.get(sAsUser,trans.user()); } else { - approver = asDelegate; + approver = asDelegate; } ArrayList rv = new ArrayList<>(); @@ -207,107 +207,107 @@ public class ApprovalForm extends Page { Identity iapprover = trans.org().getIdentity(trans,currApproverList.get(0).getApprover()); if(iapprover==null) { - rv.add(new AbsCell[] { - new TextCell(currApproverList.get(0).getApprover() + " is not part of Organization", + rv.add(new AbsCell[] { + new TextCell(currApproverList.get(0).getApprover() + " is not part of Organization", new String[] {"colspan=4", "class=head"}) - }); + }); } else { - if (!iapprover.fullID().equals(trans.user())) { - - AbsCell[] approverHeader; - // if (domainOfUser.equals(domainOfApprover)) { - // approverHeader = new AbsCell[] { - // new TextAndRefCell("Approvals Delegated to Me by ", currApproverFull, - // TODO_ILM_INFO + currApproverShort, - // true, - // new String[] {"colspan=4", "class=head"}) - // }; - // } else { - approverHeader = new AbsCell[] { - new TextCell("Approvals Delegated to Me by " + iapprover.fullName() - + '(' + iapprover.id() + ')', - new String[] {"colspan=4", "class=head"}) - }; - // } - rv.add(approverHeader); - } - - // Sort by User Requesting - Collections.sort(currApproverList, new Comparator() { - @Override - public int compare(Approval a1, Approval a2) { - return a1.getUser().compareTo(a2.getUser()); - } - }); - - String prevUser = null; - boolean userOK=true; - for (Approval appr : currApproverList) { - if (++line() { + @Override + public int compare(Approval a1, Approval a2) { + return a1.getUser().compareTo(a2.getUser()); + } + }); + + String prevUser = null; + boolean userOK=true; + for (Approval appr : currApproverList) { + if (++line0) { - msg = "After these, there will be " + numLeft + " approvals left to process"; - } - if (rv.isEmpty()) { - if (numLeft>0) { - msg = "No Approvals to process at this time for user " + userParam +". You have " - + numLeft + " other approvals to process."; - } else { - msg = "No Approvals to process at this time"; - } - } + } else { + ++numLeft; + } + } + } + if (numLeft>0) { + msg = "After these, there will be " + numLeft + " approvals left to process"; + } + if (rv.isEmpty()) { + if (numLeft>0) { + msg = "No Approvals to process at this time for user " + userParam +". You have " + + numLeft + " other approvals to process."; + } else { + msg = "No Approvals to process at this time"; + } + } } } catch (Exception e) { trans.error().log(e);