Skip to content

Instantly share code, notes, and snippets.

@justinramel
Created September 8, 2010 09:16
Show Gist options
  • Save justinramel/569877 to your computer and use it in GitHub Desktop.
Save justinramel/569877 to your computer and use it in GitHub Desktop.
class Group < ActiveRecord::Base
include ActiveDirectory
has_and_belongs_to_many :users
def members
@members ||= ldap_members(name)
end
end
module ActiveDirectory
def ldap_authenticate(user_id, password)
...
end
def ldap_members(group_name)
...
end
def ldap_remove_member(user_id)
...
end
def ldap_add_member(user_id)
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment