Add :include_operational_attributes convenient option GitHub: fix #150 Reported by jas01. Thanks!!!
Modified: lib/active_ldap/operations.rb (+3 -0) =================================================================== |
||
... 291 292 293 294 295 296 |
... 291 292 293 294 295 296 297 298 299 |
@@ -291,6 +291,9 @@ module ActiveLdap offset = options.delete(:offset) || offset options[:attributes] = options.delete(:attributes) || ['*'] options[:attributes] |= ['objectClass'] + if options.delete(:include_operational_attributes) + options[:attributes] |= ["+"] + end results = search(options).collect do |dn, attrs| instantiate([dn, attrs, {:connection => options[:connection]}]) end |
---|
Modified: test/test_find.rb (+2 -1) =================================================================== |
||
... 63 64 65 66 67 68 69 |
... 63 64 65 66 67 68 69 70 |
@@ -63,7 +63,8 @@ class TestFind < Test::Unit::TestCase def test_find_operational_attributes make_temporary_user do |user, password| - found_user = @user_class.find(user.uid, :attributes => ["*", "+"]) + found_user = @user_class.find(user.uid, + :include_operational_attributes => true) assert_equal(Time.now.utc.iso8601, found_user.modify_timestamp.utc.iso8601) end |
---|