[
https://issues.apache.org/jira/browse/ROL-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759924#action_12759924
]
Anil Gangolli commented on ROL-1724:
------------------------------------
Fixed in trunk revision 819171. Some other unreported issues were fixed in the
same checkin.
> 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.