On Mon, 17 Sep 2007 16:35:13 -0300, Robin Helgelin <[EMAIL PROTECTED]> wrote:

No, you should be able to have an arbitrary length of roles. How does
your public GrantedAuthority[] getAuthorities() from your user
UserDetails look?

I can't post the code here (and it wouldn't help much, as it's written in Portuguese), but I have this architecture:

class User {
        private List<Groups> groups;
        ...
}

class Group {
        private List<Permission> permissions;
        ...
}

class Permission {
        private String name; // name of the role/authority
}

I created an UserDetails implementation which getGrantedAuthorities() method returns all the permissions of all the groups some user belongs to. I'm using the GrantedAuthorityImpl class that comes with Acegi.

--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to