Return-Path: Delivered-To: apmail-roller-commits-archive@www.apache.org Received: (qmail 27391 invoked from network); 26 Sep 2009 16:50:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Sep 2009 16:50:38 -0000 Received: (qmail 11313 invoked by uid 500); 26 Sep 2009 16:50:38 -0000 Delivered-To: apmail-roller-commits-archive@roller.apache.org Received: (qmail 11287 invoked by uid 500); 26 Sep 2009 16:50:38 -0000 Mailing-List: contact commits-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@roller.apache.org Delivered-To: mailing list commits@roller.apache.org Received: (qmail 11276 invoked by uid 99); 26 Sep 2009 16:50:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Sep 2009 16:50:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Sep 2009 16:50:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 09717234C004 for ; Sat, 26 Sep 2009 09:50:16 -0700 (PDT) Message-ID: <399456198.1253983816024.JavaMail.jira@brutus> Date: Sat, 26 Sep 2009 09:50:16 -0700 (PDT) From: "Anil Gangolli (JIRA)" To: commits@roller.apache.org Subject: [jira] Assigned: (ROL-1724) Bug in trunk AuthoritiesPopulator.java MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ROL-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anil Gangolli reassigned ROL-1724: ---------------------------------- Assignee: Anil Gangolli (was: David Johnson) > Bug in trunk AuthoritiesPopulator.java > -------------------------------------- > > Key: ROL-1724 > URL: https://issues.apache.org/jira/browse/ROL-1724 > Project: Roller > Issue Type: Bug > Components: Authentication, Roles and Access Controls > Affects Versions: 5.0 > Reporter: David Johnson > Assignee: Anil Gangolli > Priority: Minor > Fix For: 5.0 > > > On Sat, May 31, 2008 at 9:21 AM, Gene McCulley wrote: > > I am deploying Roller (currently using development trunk) to an intranet. > > The intranet uses Apache2 connected to Tomcat 5.5 via mod_jk. The site is > > served up over https and protected by basic auth using OpenLDAP for > > authentication. I have configured the Acegi security.xml to use the > > OpenLDAP server as described in the documentation. > > > > I had trouble with AuthoritiesPopulator throwing a ClassCastException and > > had to make the following patch with which initial user authentication now > > works fine. It looks like the code assumed that UserManager.getRoles() > > returned List but it returns List. > > > > Index: > > apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java > > =================================================================== > > --- > > apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java > > (revision 661721) > > +++ > > apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java > > (working copy) > > @@ -30,7 +30,6 @@ > > import org.apache.roller.weblogger.business.Weblogger; > > import org.apache.roller.weblogger.business.WebloggerFactory; > > import org.apache.roller.weblogger.pojos.User; > > -import org.apache.roller.weblogger.pojos.UserRole; > > import org.springframework.util.Assert; > > > > > > @@ -70,8 +69,8 @@ > > GrantedAuthority[] authorities = new > > GrantedAuthorityImpl[roleCount]; > > int i = 0; > > for (Iterator it = roles.iterator(); it.hasNext();) { > > - UserRole role = (UserRole) it.next(); > > - authorities[i++] = new GrantedAuthorityImpl(role.getRole()); > > + String role = (String) it.next(); > > + authorities[i++] = new GrantedAuthorityImpl(role); > > } > > > > if (defaultRole != null) { -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.