From 75feedb910d7e0b710116f6d39e2285df9f5399b Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Mon, 31 May 2004 04:55:12 +0000 Subject: [PATCH] community dispatch for non-members goes to the profile page --- .../venice/ui/servlet/CommunityDispatchServlet.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/silverwrist/venice/ui/servlet/CommunityDispatchServlet.java b/src/com/silverwrist/venice/ui/servlet/CommunityDispatchServlet.java index 0cd79ac..c14bda6 100644 --- a/src/com/silverwrist/venice/ui/servlet/CommunityDispatchServlet.java +++ b/src/com/silverwrist/venice/ui/servlet/CommunityDispatchServlet.java @@ -9,9 +9,9 @@ * * The Original Code is the Venice Web Communities System. * - * The Initial Developer of the Original Code is Eric J. Bowersox , + * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - * Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + * Copyright (C) 2001-2004 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. * * Contributor(s): */ @@ -46,6 +46,10 @@ public class CommunityDispatchServlet extends BaseServlet { // get the community's context from the alias name CommunityContext comm = req.getUser().getCommunityContext(alias); + if (!(comm.isMember() || comm.isAdmin())) + // if not a member, hit the profile page, which has the Join Now button + return new Redirect("comm/show.js.vs?cc=" + comm.getCommunityID(),LinkTypes.SERVLET); + // get the default servlet from the community context String def_servlet = req.getDefaultServletAddress(comm); if (logger.isDebugEnabled())