portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r887214 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login: login-xhtmlbasic.jsp login.jsp portal-login.jsp
Date Fri, 04 Dec 2009 14:46:47 GMT
Author: ate
Date: Fri Dec  4 14:46:46 2009
New Revision: 887214

URL: http://svn.apache.org/viewvc?rev=887214&view=rev
Log:
Deriving "change password" link and destination url for logout dynamically for the LoginPortlet
to stay within the currently used pipeline, e.g. /portal, /ui, etc.

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp?rev=887214&r1=887213&r2=887214&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login-xhtmlbasic.jsp
Fri Dec  4 14:46:46 2009
@@ -28,9 +28,9 @@
 <c:choose>
   <c:when test="${pageContext.request.userPrincipal != null}">
     <fmt:message key="login.label.Welcome"><fmt:param><c:out value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br/>
-    <a href='<c:url context="${portalContextPath}" value="/login/logout"/>'><fmt:message
key="login.label.Logout"/></a>
+    <a href='<c:url context="${portalContextPath}" value="/login/logout?${loginDestination}=${requestContext.portalURL.basePath}"/>'><fmt:message
key="login.label.Logout"/></a>
     <br/>
-    <a href='<c:url context="${portalContextPath}" value="/portal/my-account.psml"/>'><fmt:message
key="login.label.ChangePassword"/></a>
+    <a href='<c:url context="/" value="${requestContext.portalURL.basePath}/my-account.psml"/>'><fmt:message
key="login.label.ChangePassword"/></a>
   </c:when>
   <c:otherwise>
     <%-- backdoor access to the portal session to get the login error count --%>

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp?rev=887214&r1=887213&r2=887214&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
Fri Dec  4 14:46:46 2009
@@ -30,12 +30,14 @@
 </c:if>
 <c:set var="encoder" value="${requestContext.request.parameterMap.encoder[0]}"/>
 <c:set var="destLogin" value="/login/proxy"/>
-<c:set var="destLogout" value="/login/logout"/>
-<c:set var="destAccount" value="/portal/my-account.psml"/>
+<c:set var="destLogout" value="/login/logout?${loginDestination}=${requestContext.portalURL.basePath}"/>
+<c:set var="destAccount" value="${requestContext.portalURL.basePath}/my-account.psml"/>
+<c:set var="destContext" value="/"/>
 <c:if test="${not empty encoder && encoder == 'desktop'}">
   <c:set var="destLogin" value="${destLogin}?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
-  <c:set var="destLogout" value="${destLogout}?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+  <c:set var="destLogout" value="/login/logout?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
   <c:set var="destAccount" value="/desktop/my-account.psml?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+  <c:set var="destContext" value="${portalContextPath}"/>
 </c:if>
 <div class="portlet-section-text">
 <c:choose>
@@ -43,7 +45,7 @@
     <fmt:message key="login.label.Welcome"><fmt:param><c:out value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
     <a href='<c:url context="${portalContextPath}" value="${destLogout}"/>'><fmt:message
key="login.label.Logout"/></a>
     <br>
-    <a href='<c:url context="${portalContextPath}" value="${destAccount}"/>'><fmt:message
key="login.label.ChangePassword"/></a>
+    <a href='<c:url context="${destContext}" value="${destAccount}"/>'><fmt:message
key="login.label.ChangePassword"/></a>
   </c:when>
   <c:otherwise>
     <%-- backdoor access to the portal session to get the login error count --%>

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp?rev=887214&r1=887213&r2=887214&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
Fri Dec  4 14:46:46 2009
@@ -31,12 +31,14 @@
 </c:if>
 <c:set var="encoder" value="${requestContext.request.parameterMap.encoder[0]}"/>
 <c:set var="destLogin" value="/login/proxy"/>
-<c:set var="destLogout" value="/login/logout"/>
-<c:set var="destAccount" value="/portal/my-account.psml"/>
+<c:set var="destLogout" value="/login/logout?${loginDestination}=${requestContext.portalURL.basePath}"/>
+<c:set var="destAccount" value="${requestContext.portalURL.basePath}/my-account.psml"/>
+<c:set var="destContext" value="/"/>
 <c:if test="${not empty encoder && encoder == 'desktop'}">
   <c:set var="destLogin" value="${destLogin}?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
-  <c:set var="destLogout" value="${destLogout}?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+  <c:set var="destLogout" value="/login/logout?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
   <c:set var="destAccount" value="/desktop/my-account.psml?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
+  <c:set var="destContext" value="${portalContextPath}"/>
 </c:if>
 
 <c_rt:set var="contentType" value="<%=renderRequest.getResponseContentType()%>"/>
@@ -80,7 +82,7 @@
     <fmt:message key="login.label.Welcome"><fmt:param><c:out value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
     <a href='<c:url context="${portalContextPath}" value="${destLogout}"/>'><fmt:message
key="login.label.Logout"/></a>
     <br>
-    <a href='<c:url context="${portalContextPath}" value="${destAccount}"/>'><fmt:message
key="login.label.ChangePassword"/></a>
+    <a href='<c:url context="${destContext}" value="${destAccount}"/>'><fmt:message
key="login.label.ChangePassword"/></a>
   </c:when>
   <c:otherwise>
     <%-- backdoor access to the portal session to get the login error count --%>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message