Return-Path: Delivered-To: apmail-continuum-dev-archive@www.apache.org Received: (qmail 51481 invoked from network); 26 Oct 2009 18:09:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Oct 2009 18:09:27 -0000 Received: (qmail 12660 invoked by uid 500); 26 Oct 2009 18:09:27 -0000 Delivered-To: apmail-continuum-dev-archive@continuum.apache.org Received: (qmail 12544 invoked by uid 500); 26 Oct 2009 18:09:26 -0000 Mailing-List: contact dev-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list dev@continuum.apache.org Received: (qmail 12534 invoked by uid 99); 26 Oct 2009 18:09:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 18:09:26 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.216.192] (HELO mail-px0-f192.google.com) (209.85.216.192) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 18:09:17 +0000 Received: by pxi30 with SMTP id 30so3347710pxi.14 for ; Mon, 26 Oct 2009 11:08:55 -0700 (PDT) Received: by 10.114.69.18 with SMTP id r18mr11201134waa.209.1256580535314; Mon, 26 Oct 2009 11:08:55 -0700 (PDT) Received: from ?10.0.0.1? ([121.218.188.139]) by mx.google.com with ESMTPS id 21sm321678pzk.3.2009.10.26.11.08.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Oct 2009 11:08:54 -0700 (PDT) Sender: Brett Porter Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) Subject: Re: svn commit: r825338 - /continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java From: Brett Porter In-Reply-To: <20091014231929.051572388897@eris.apache.org> Date: Tue, 27 Oct 2009 05:08:44 +1100 Content-Transfer-Encoding: 7bit Message-Id: <9617DA61-2E41-415E-B313-177CECFAAD14@apache.org> References: <20091014231929.051572388897@eris.apache.org> To: dev@continuum.apache.org X-Mailer: Apple Mail (2.1076) X-Virus-Checked: Checked by ClamAV on apache.org Isn't it also correct to say .endsWith( projectGroup.getName() ) ? Cheers, Brett On 15/10/2009, at 10:19 AM, ctan@apache.org wrote: > Author: ctan > Date: Wed Oct 14 23:19:28 2009 > New Revision: 825338 > > URL: http://svn.apache.org/viewvc?rev=825338&view=rev > Log: > [CONTINUUM-2387] retrieve correct roles to show only the users of > the project group in the members tab > > Modified: > continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/ > org/apache/maven/continuum/web/action/ProjectGroupAction.java > > Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/ > main/java/org/apache/maven/continuum/web/action/ > ProjectGroupAction.java > URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=825338&r1=825337&r2=825338&view=diff > = > = > = > = > = > = > = > = > ====================================================================== > --- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/ > java/org/apache/maven/continuum/web/action/ProjectGroupAction.java > (original) > +++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/ > java/org/apache/maven/continuum/web/action/ProjectGroupAction.java > Wed Oct 14 23:19:28 2009 > @@ -689,7 +689,8 @@ > List roleNames = new ArrayList(); > for ( Role r : roles ) > { > - if ( r.getName().indexOf( projectGroup.getName() ) > > -1 ) > + int index = r.getName().indexOf > ( projectGroup.getName() ); > + if ( index > -1 && r.getName().substring > ( index ).trim().equals( projectGroup.getName() ) ) > { > roleNames.add( r.getName() ); > } > >