Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 61923 invoked from network); 12 Sep 2007 12:33:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2007 12:33:39 -0000 Received: (qmail 87497 invoked by uid 500); 12 Sep 2007 12:33:24 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 87299 invoked by uid 500); 12 Sep 2007 12:33:23 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 87267 invoked by uid 99); 12 Sep 2007 12:33:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 05:33:23 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 12:33:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 43B431A9832; Wed, 12 Sep 2007 05:33:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r574916 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java Date: Wed, 12 Sep 2007 12:33:07 -0000 To: continuum-commits@maven.apache.org From: evenisse@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070912123307.43B431A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: evenisse Date: Wed Sep 12 05:33:06 2007 New Revision: 574916 URL: http://svn.apache.org/viewvc?rev=574916&view=rev Log: [CONTINUMM-1395] Fix "Add Ant/Shell project" for users that don't have admin rights Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=574916&r1=574915&r2=574916&view=diff ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java (original) +++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java Wed Sep 12 05:33:06 2007 @@ -75,7 +75,7 @@ * @plexus.requirement role-hint="default" */ private ProfileService profileService; - + private int projectGroupId; public void validate() @@ -112,6 +112,8 @@ public String add() throws ContinuumException { + initializeProjectGroupName(); + try { if ( StringUtils.isEmpty( getProjectGroupName() ) ) @@ -151,8 +153,8 @@ { this.setProjectGroupId( this.getSelectedProjectGroup() ); return "projectGroupSummary"; - } - + } + return SUCCESS; } @@ -195,6 +197,21 @@ } this.profiles = profileService.getAllProfiles(); return SUCCESS; + } + + private void initializeProjectGroupName() + { + if ( disableGroupSelection == true ) + { + try + { + projectGroupName = getContinuum().getProjectGroup( selectedProjectGroup ).getName(); + } + catch ( ContinuumException e ) + { + e.printStackTrace(); + } + } } public String getProjectName()