Sha256: fbf437a5bf190eec80850bac6f442683039a3b5a23feaa28f4a1355444cdb0bd
Contents?: true
Size: 1.22 KB
Versions: 3
Compression:
Stored size: 1.22 KB
Contents
module Adauth module AdObjects # Active Directory Group Object # # Inherits from Adauth::AdObject class Group < Adauth::AdObject # Field mapping # # Maps methods to LDAP fields e.g. # # :foo => :bar # # Becomes # # Computer.name # # Which calls .name on the LDAP object Fields = { :name => :samaccountname, :cn_members => [ :member, Proc.new {|g| g.sub(/.*?CN=(.*?),.*/, '\1')} ], :cn_groups => [ :memberof, Proc.new {|g| g.sub(/.*?CN=(.*?),.*/, '\1')} ] } # Object Net::LDAP filter # # Used to restrict searches to just this object ObjectFilter = Net::LDAP::Filter.eq("objectClass", "group") # Returns all the objects which are members of this group def members unless @members @members = convert_to_objects(cn_members) end @members end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
adauth-2.0.0pre2 | lib/adauth/ad_objects/group.rb |
adauth-2.0.0pre1 | lib/adauth/ad_objects/group.rb |
adauth-2.0.0pre | lib/adauth/ad_objects/group.rb |