May 23rd, 2011, 11:34 AM
How to search nested authorities?
I'm using OpenLDAP 2.3.x, Spring LDAP 1.3.0.RELEASE and Spring Security 3.0.4.RELEASE.
I have the following Group->member structure:
When I get the authorities of user1, Spring returns only Group A.
I need to get all the groups that has A as member.
What I'm doing is modifying the userContextMapper bean in mapUserFromContext method and searching manually in LDAP all the nested groups.
The problem I'm having with my solution is that I can't find a way to create a GrantedAuthority.
So, I have 2 questions:
1) Is there a better way to find the nested Authorities?
2) How can I create a new GrantedAuthority object?
Thanks in advance,
Tags for this Thread