Results 1 to 2 of 2

Thread: How to find all Groups Names a user belong to?

  1. #1

    Default How to find all Groups Names a user belong to?

    Hi,

    I am new to Spring and ACEGI-LDAP. I have to search for all the groups/subgroups a user belong to. I am using the following method

    Set userRoles =
    ldapTemplate.searchForSingleAttributeValues(
    getGroupSearchBase(),
    groupSearchFilter,
    new String[] { userDn, username },
    groupRoleAttribute);

    where
    Group Search Base = "cn=XYZ, cn=Groups, dc=test, dc=com"
    Group Search Filter = "(member={0})"
    Group Role Attribute = "cn"
    userDN = cn=myUser, cn=Users, dc=test, dc=com
    userName = "myUser"

    XYZ contains groups - A, B, C, D.
    "myUser" is a unique member in B, D.
    I need B and D to be returned by the method. Do I need to change the parameters I am passing or I need to use any other method?

    Thanks for your help.

  2. #2
    Join Date
    Jul 2005
    Location
    Helsingborg, Sweden
    Posts
    504

    Default

    Try the Spring Security forum.
    Ulrik Sandberg
    Jayway (www.jayway.com)
    Spring LDAP project member

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •