Return-Path: X-Original-To: apmail-portals-jetspeed-dev-archive@www.apache.org Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D433C73D2 for ; Tue, 4 Oct 2011 05:14:14 +0000 (UTC) Received: (qmail 69878 invoked by uid 500); 4 Oct 2011 05:14:14 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 69841 invoked by uid 500); 4 Oct 2011 05:14:13 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 69832 invoked by uid 99); 4 Oct 2011 05:14:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 05:14:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 05:14:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AECBB23888FE; Tue, 4 Oct 2011 05:13:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1178685 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/ jetspeed-api/src/main/java/org/apache/jetspeed/administration/ jetspeed-portal-resources/src/main/resources/conf/jetspeed/ Date: Tue, 04 Oct 2011 05:13:51 -0000 To: jetspeed-dev@portals.apache.org From: taylor@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111004051351.AECBB23888FE@eris.apache.org> Author: taylor Date: Tue Oct 4 05:13:51 2011 New Revision: 1178685 URL: http://svn.apache.org/viewvc?rev=1178685&view=rev Log: JS2-1264: When logging on to Jetui, users are shown the public space home page. Instead, users should be able to be directly placed in their home space. Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java?rev=1178685&r1=1178684&r2=1178685&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java (original) +++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java Tue Oct 4 05:13:51 2011 @@ -24,6 +24,8 @@ import javax.servlet.http.HttpServletReq import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import org.apache.jetspeed.administration.PortalConfigurationConstants; +import org.apache.jetspeed.om.folder.Folder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.jetspeed.Jetspeed; @@ -53,9 +55,9 @@ public class LoginServlet extends HttpSe { String destination = (String) session .getAttribute(LoginConstants.DESTINATION); - if (destination == null) - destination = request.getContextPath() + "/"; - + if (destination == null) { + destination = request.getContextPath() + "/"; + } response.sendRedirect(response.encodeURL(destination)); } @@ -67,6 +69,20 @@ public class LoginServlet extends HttpSe RequestContext context = null; try { + String jetuiMode = Jetspeed.getConfiguration().getString(PortalConfigurationConstants.JETUI_CUSTOMIZATION_METHOD, PortalConfigurationConstants.JETUI_CUSTOMIZATION_SERVER); + boolean redirectHomeSpace = Jetspeed.getConfiguration().getBoolean(PortalConfigurationConstants.JETUI_REDIRECT_HOME_SPACE, true); + if (redirectHomeSpace && jetuiMode.equals(PortalConfigurationConstants.JETUI_CUSTOMIZATION_AJAX)) { + String destination = (String)session.getAttribute(LoginConstants.DESTINATION); + if (destination == null) destination = "/"; + String username = (String)session.getAttribute(LoginConstants.USERNAME); + if (username != null) { + + if (!destination.endsWith("/")) + destination += "/"; + destination += (Folder.RESERVED_USER_FOLDER_NAME + "/" + username); + session.setAttribute(LoginConstants.DESTINATION, destination); + } + } contextComponent = (RequestContextComponent) Jetspeed.getComponentManager().getComponent(RequestContextComponent.class); context = contextComponent.create(request, response, getServletConfig()); engine.service(context); Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java?rev=1178685&r1=1178684&r2=1178685&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/administration/PortalConfigurationConstants.java Tue Oct 4 05:13:51 2011 @@ -92,7 +92,8 @@ public interface PortalConfigurationCons static final String JETUI_DRAG_YAHOO = "yahoo"; static final String JETUI_STYLE_PORTLET = "jetui.style.portlet"; static final String JETUI_STYLE_LAYOUT = "jetui.style.layout"; - static final String JETUI_STYLE_DRAG_HANDLE = "jetui.style.drag.handle"; + static final String JETUI_STYLE_DRAG_HANDLE = "jetui.style.drag.handle"; + static final String JETUI_REDIRECT_HOME_SPACE = "jetui.redirect.home.space"; /** Portlet Modes, Window States: return string arrays **/ static final String SUPPORTED_WINDOW_STATES = "supported.windowstate"; Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties?rev=1178685&r1=1178684&r2=1178685&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties (original) +++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties Tue Oct 4 05:13:51 2011 @@ -409,4 +409,6 @@ jetui.style.portlet = .portal-layout-cel jetui.style.layout = .portal-layout-column # title or handle of a portlet window to drag from jetui.style.drag.handle = .PTitle +# redirect to home space on login +jetui.redirect.home.space=true --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org