[FEDIZ-147] Disable local IDP from home realm selection if isUseCurrentIdp() is
set to false
Conflicts:
services/idp/src/main/webapp/WEB-INF/idplist.jsp
Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/b6bc005f
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/b6bc005f
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/b6bc005f
Branch: refs/heads/1.2.x-fixes
Commit: b6bc005f41f91a82db43cf04dd4f217cb185574a
Parents: af587f1
Author: Jan Bernhardt <[email protected]>
Authored: Thu Jan 21 10:28:09 2016 +0100
Committer: Jan Bernhardt <[email protected]>
Committed: Tue Feb 9 08:12:33 2016 +0100
----------------------------------------------------------------------
services/idp/src/main/webapp/WEB-INF/idplist.jsp | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/b6bc005f/services/idp/src/main/webapp/WEB-INF/idplist.jsp
----------------------------------------------------------------------
diff --git a/services/idp/src/main/webapp/WEB-INF/idplist.jsp
b/services/idp/src/main/webapp/WEB-INF/idplist.jsp
index dc87376..5036a96 100644
--- a/services/idp/src/main/webapp/WEB-INF/idplist.jsp
+++ b/services/idp/src/main/webapp/WEB-INF/idplist.jsp
@@ -13,14 +13,13 @@
<i>Where are you from? Please, select one Identity Provider in the list
which is able to authenticate you. </i>
<form:form method="POST" id="idplist" name="idplist">
<br />
- <%
- Idp idpConfig = (Idp)request.getAttribute("idpConfig");
- %>
+ <% Idp idp = (Idp)request.getAttribute("idpConfig");
+ List<TrustedIdp> trustedIDPs = idp.getTrustedIdps(); %>
<select name="whr">
- <option value="<%=idpConfig.getRealm()%>" selected="selected"
><%=idpConfig.getServiceDescription()%></option>
- <%
- for (TrustedIdp trustedIDP : idpConfig.getTrustedIdps()) {
- %>
+ <% if (idp.isUseCurrentIdp()) { %>
+ <option value="<%=idp.getRealm()%>" selected="selected"
><%=idp.getServiceDescription()%></option>
+ <% }
+ for (TrustedIdp trustedIDP : trustedIDPs) { %>
<option
value="<%=trustedIDP.getRealm()%>"><%=trustedIDP.getDescription()%></option>
<% } %>
</select>