roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrai...@apache.org
Subject svn commit: r587386 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java
Date Tue, 23 Oct 2007 04:41:26 GMT
Author: mraible
Date: Mon Oct 22 21:41:20 2007
New Revision: 587386

URL: http://svn.apache.org/viewvc?rev=587386&view=rev
Log:
Fixed AuthoritiesPopulator for LDAP

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java?rev=587386&r1=587385&r2=587386&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/security/AuthoritiesPopulator.java
Mon Oct 22 21:41:20 2007
@@ -65,14 +65,14 @@
         int roleCount = userData.getRoles().size();
         if (defaultRole != null) roleCount++;
         GrantedAuthority[] authorities = new GrantedAuthorityImpl[roleCount];
-        int i = 1;
+        int i = 0;
         for (Iterator it = userData.getRoles().iterator(); it.hasNext();) {
             UserRole role = (UserRole) it.next();
             authorities[i++] = new GrantedAuthorityImpl(role.getRole());
         }
         
         if (defaultRole != null) {
-            authorities[roleCount] = defaultRole;
+            authorities[roleCount-1] = defaultRole;
         }
 
         if (authorities.length == 0) {



Mime
View raw message