roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Johnson (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (ROL-1724) Bug in trunk AuthoritiesPopulator.java
Date Wed, 30 Sep 2009 02:20:32 GMT

     [ https://issues.apache.org/jira/browse/ROL-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Johnson resolved ROL-1724.
--------------------------------

    Resolution: Fixed

Marking as resolved because this is now fixed.

> 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<UserRole> but it returns List<String>.
> >
> > 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.


Mime
View raw message