lib/adauth/ad_object.rb in adauth-2.0.0pre vs lib/adauth/ad_object.rb in adauth-2.0.0pre1
- old
+ new
@@ -1,6 +1,10 @@
module Adauth
+ def self.add_field(object, adauth_method, ldap_method)
+ object::Fields[adauth_method] = ldap_method
+ end
+
# Active Directory Interface Object
#
# Objects inherit from this class.
#
# Provides all the common functions for Active Directory.
@@ -77,9 +81,13 @@
@ldap_object.dn.split(/,/).each do |entry|
@dn_ous.push entry.gsub(/OU=/, '').gsub(/CN=/,'') if entry =~ /OU=/ or entry == "CN=Users"
end
end
@dn_ous
+ end
+
+ def modify(operations)
+ raise "Modify Operation Failed" unless Adauth.connection.modify :dn => @ldap_object.dn, :operations => operations
end
private
def convert_to_objects(array)
\ No newline at end of file