Skip to content

LDAP extra_attributes (memberof not returning fix) #173

Open
@aurelienduarte

Description

@aurelienduarte

Due to the fact that memberof is not an actual attribute, it has to be explicitly requested as an attribute in the searchRequest to be returned, this can be addressed by explicitly defining that the extra_attributes are returned on the search request as follows:

def find_user
  results= if @options[:extra_attributes]
            @ldap.search(:base => options[:ldap][:base], :filter => user_filter,
                         :attributes => @options[:extra_attributes].gsub(/ */, '').split(','))
          else
            @ldap.search(:base => options[:ldap][:base], :filter => user_filter)
          end
  return results.first
end

A side effect of this change is an optimised/lighter search.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aurelienduarte

        Issue actions

          LDAP extra_attributes (memberof not returning fix) · Issue #173 · rubycas/rubycas-server