X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aaf%2Fauthz.git;a=blobdiff_plain;f=auth%2Fauth-gui%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fgui%2Fpages%2FRoleDetail.java;h=7b01e8f2c7930683a325eee7109aaaf3a0770ded;hp=dcf0f928dd7afd11e85bdaf7ccc15ab974dd1eb5;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9 diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java index dcf0f928..7b01e8f2 100644 --- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.java +++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RoleDetail.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. @@ -63,7 +63,7 @@ import aaf.v2_0.UserRoles; /** * Detail Page for Permissions - * + * * @author Jonathan * */ @@ -82,7 +82,7 @@ public class RoleDetail extends Page { /** * Implement the table content for Permissions Detail - * + * * @author Jonathan * */ @@ -116,8 +116,8 @@ public class RoleDetail extends Page { return; } - - try { + + try { gui.clientAsUser(trans.getUserPrincipal(), new Retryable() { @Override public Boolean code(Rcli client) throws CadiException, ConnectException, APIException { @@ -134,7 +134,7 @@ public class RoleDetail extends Page { trans.put(sMayWrite,mayWrite); Boolean mayApprove = trans.fish(new AAFPermission(role.getNs(),ACCESS,":role:"+role.getName(),"approve")); trans.put(sMayApprove, mayApprove); - + if (mayWrite || mayApprove) { Mark js = new Mark(); Mark fn = new Mark(); @@ -153,7 +153,7 @@ public class RoleDetail extends Page { "dcb.checked= (d.orig != d.value)" ).end(fn) .end(js); - + Mark mark = new Mark(); hgen.incr(mark,"form","method=post"); trans.put(sMark, mark); @@ -163,7 +163,7 @@ public class RoleDetail extends Page { trans.error().printf("Error calling AAF for Roles in GUI, Role Detail %d: %s",fr.code(),fr.body()); return false; } - + if (fur.get(AAF_GUI.TIMEOUT)) { trans.put(sUserRole, fur.value.getUserRole()); } else { @@ -187,7 +187,7 @@ public class RoleDetail extends Page { final String pRole = trans.get(sRoleName, null); final Role role = trans.get(sRole,null); ArrayList rv = new ArrayList<>(); - + if (role!=null) { boolean mayWrite = trans.get(sMayWrite, false); boolean mayApprove = trans.get(sMayApprove, false); @@ -241,11 +241,11 @@ public class RoleDetail extends Page { } } } - + if (mayApprove) { rv.add(AbsCell.HLINE); - // + // rv.add(new AbsCell[] { new TextCell("Users in Role:","width=25%"), new TextCell("Delete","width=10%"), @@ -256,7 +256,7 @@ public class RoleDetail extends Page { if (userroles!=null) { for (UserRole ur : userroles) { String tag = "userrole"; - + rv.add(new AbsCell[] { AbsCell.Null, new CheckBoxCell(tag+".delete", ur.getUser()), @@ -267,8 +267,8 @@ public class RoleDetail extends Page { } } } - - // History + + // History rv.add(new AbsCell[] { new RefCell("See History",RoleHistory.HREF + "?role=" + pRole,false,"class=greenbutton") }); @@ -299,5 +299,5 @@ public class RoleDetail extends Page { } } -} +} \ No newline at end of file