Sha256: 159045556ca183e51b1b0457da035189ad586dd14b39735248e552a1210f9ecf

Contents?: true

Size: 981 Bytes

Versions: 6

Compression:

Stored size: 981 Bytes

Contents

module Adauth
    module AdObjects
        # Active Directory OU Object
        #
        # Inherits from Adauth::AdObject
        class Folder < 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 => :name
                }
            
            # Object Net::LDAP filter
            #
            # Used to restrict searches to just this object
            ObjectFilter = Net::LDAP::Filter.eq("objectClass", "top")
            
            # Returns the Domain Object which is useful for building domain maps.
            def self.root
              self.new(Adauth.connection.search(:filter => Net::LDAP::Filter.eq("objectClass", "Domain")).first)
            end
        end
    end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adauth-2.0.5 lib/adauth/ad_objects/folder.rb
adauth-2.0.4 lib/adauth/ad_objects/folder.rb
adauth-2.0.3 lib/adauth/ad_objects/folder.rb
adauth-2.0.2 lib/adauth/ad_objects/folder.rb
adauth-2.0.1 lib/adauth/ad_objects/folder.rb
adauth-2.0.0 lib/adauth/ad_objects/folder.rb