Created
September 8, 2010 09:16
-
-
Save justinramel/569877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Group < ActiveRecord::Base | |
include ActiveDirectory | |
has_and_belongs_to_many :users | |
def members | |
@members ||= ldap_members(name) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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