Package org.apache.roller.weblogger.pojos

Examples of org.apache.roller.weblogger.pojos.UserRole


       
        GrantedAuthority[] authorities =
            new GrantedAuthorityImpl[userData.getRoles().size()];
        int i = 0;
        for (Iterator it = userData.getRoles().iterator(); it.hasNext();) {
            UserRole role = (UserRole)it.next();
            authorities[i++] = new GrantedAuthorityImpl(role.getRole());
        }
       
        return new org.acegisecurity.userdetails.User(
            userData.getUserName(), userData.getPassword(), true, authorities);
    }
View Full Code Here


        int roleCount = userData.getRoles().size();
        if (defaultRole != null) roleCount++;
        GrantedAuthority[] authorities = new GrantedAuthorityImpl[roleCount];
        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-1] = defaultRole;
        }
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.pojos.UserRole

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.