powerhome-activeldap 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +6 -0
  3. data/COPYING +340 -0
  4. data/Gemfile +12 -0
  5. data/LICENSE +59 -0
  6. data/README.textile +140 -0
  7. data/TODO +32 -0
  8. data/benchmark/README.md +64 -0
  9. data/benchmark/bench-backend.rb +247 -0
  10. data/benchmark/bench-instantiate.rb +98 -0
  11. data/benchmark/config.yaml.sample +5 -0
  12. data/doc/text/development.textile +54 -0
  13. data/doc/text/news.textile +811 -0
  14. data/doc/text/rails.textile +144 -0
  15. data/doc/text/tutorial.textile +1010 -0
  16. data/examples/config.yaml.example +5 -0
  17. data/examples/example.der +0 -0
  18. data/examples/example.jpg +0 -0
  19. data/examples/groupadd +41 -0
  20. data/examples/groupdel +35 -0
  21. data/examples/groupls +49 -0
  22. data/examples/groupmod +42 -0
  23. data/examples/lpasswd +55 -0
  24. data/examples/objects/group.rb +13 -0
  25. data/examples/objects/ou.rb +4 -0
  26. data/examples/objects/user.rb +20 -0
  27. data/examples/ouadd +38 -0
  28. data/examples/useradd +45 -0
  29. data/examples/useradd-binary +53 -0
  30. data/examples/userdel +34 -0
  31. data/examples/userls +50 -0
  32. data/examples/usermod +42 -0
  33. data/examples/usermod-binary-add +50 -0
  34. data/examples/usermod-binary-add-time +54 -0
  35. data/examples/usermod-binary-del +48 -0
  36. data/examples/usermod-lang-add +43 -0
  37. data/lib/active_ldap.rb +85 -0
  38. data/lib/active_ldap/action_controller/ldap_benchmarking.rb +55 -0
  39. data/lib/active_ldap/acts/tree.rb +78 -0
  40. data/lib/active_ldap/adapter/base.rb +707 -0
  41. data/lib/active_ldap/adapter/jndi.rb +184 -0
  42. data/lib/active_ldap/adapter/jndi_connection.rb +185 -0
  43. data/lib/active_ldap/adapter/ldap.rb +290 -0
  44. data/lib/active_ldap/adapter/ldap_ext.rb +105 -0
  45. data/lib/active_ldap/adapter/net_ldap.rb +309 -0
  46. data/lib/active_ldap/adapter/net_ldap_ext.rb +23 -0
  47. data/lib/active_ldap/association/belongs_to.rb +47 -0
  48. data/lib/active_ldap/association/belongs_to_many.rb +58 -0
  49. data/lib/active_ldap/association/children.rb +21 -0
  50. data/lib/active_ldap/association/collection.rb +105 -0
  51. data/lib/active_ldap/association/has_many.rb +31 -0
  52. data/lib/active_ldap/association/has_many_utils.rb +44 -0
  53. data/lib/active_ldap/association/has_many_wrap.rb +75 -0
  54. data/lib/active_ldap/association/proxy.rb +107 -0
  55. data/lib/active_ldap/associations.rb +205 -0
  56. data/lib/active_ldap/attribute_methods.rb +23 -0
  57. data/lib/active_ldap/attribute_methods/before_type_cast.rb +24 -0
  58. data/lib/active_ldap/attribute_methods/dirty.rb +43 -0
  59. data/lib/active_ldap/attribute_methods/query.rb +31 -0
  60. data/lib/active_ldap/attribute_methods/read.rb +44 -0
  61. data/lib/active_ldap/attribute_methods/write.rb +38 -0
  62. data/lib/active_ldap/attributes.rb +176 -0
  63. data/lib/active_ldap/base.rb +1410 -0
  64. data/lib/active_ldap/callbacks.rb +71 -0
  65. data/lib/active_ldap/command.rb +49 -0
  66. data/lib/active_ldap/compatible.rb +44 -0
  67. data/lib/active_ldap/configuration.rb +147 -0
  68. data/lib/active_ldap/connection.rb +299 -0
  69. data/lib/active_ldap/distinguished_name.rb +291 -0
  70. data/lib/active_ldap/entry_attribute.rb +78 -0
  71. data/lib/active_ldap/escape.rb +12 -0
  72. data/lib/active_ldap/get_text.rb +20 -0
  73. data/lib/active_ldap/get_text/parser.rb +161 -0
  74. data/lib/active_ldap/helper.rb +92 -0
  75. data/lib/active_ldap/human_readable.rb +133 -0
  76. data/lib/active_ldap/ldap_error.rb +74 -0
  77. data/lib/active_ldap/ldif.rb +930 -0
  78. data/lib/active_ldap/log_subscriber.rb +50 -0
  79. data/lib/active_ldap/object_class.rb +95 -0
  80. data/lib/active_ldap/operations.rb +624 -0
  81. data/lib/active_ldap/persistence.rb +100 -0
  82. data/lib/active_ldap/populate.rb +53 -0
  83. data/lib/active_ldap/railtie.rb +43 -0
  84. data/lib/active_ldap/railties/controller_runtime.rb +48 -0
  85. data/lib/active_ldap/schema.rb +701 -0
  86. data/lib/active_ldap/schema/syntaxes.rb +422 -0
  87. data/lib/active_ldap/timeout.rb +75 -0
  88. data/lib/active_ldap/timeout_stub.rb +17 -0
  89. data/lib/active_ldap/user_password.rb +99 -0
  90. data/lib/active_ldap/validations.rb +200 -0
  91. data/lib/active_ldap/version.rb +3 -0
  92. data/lib/active_ldap/xml.rb +139 -0
  93. data/lib/rails/generators/active_ldap/model/USAGE +18 -0
  94. data/lib/rails/generators/active_ldap/model/model_generator.rb +47 -0
  95. data/lib/rails/generators/active_ldap/model/templates/model_active_ldap.rb +3 -0
  96. data/lib/rails/generators/active_ldap/scaffold/scaffold_generator.rb +14 -0
  97. data/lib/rails/generators/active_ldap/scaffold/templates/ldap.yml +19 -0
  98. data/po/en/active-ldap.po +4029 -0
  99. data/po/ja/active-ldap.po +4060 -0
  100. data/test/add-phonetic-attribute-options-to-slapd.ldif +10 -0
  101. data/test/al-test-utils.rb +428 -0
  102. data/test/command.rb +111 -0
  103. data/test/config.yaml.sample +6 -0
  104. data/test/fixtures/lower_case_object_class_schema.rb +802 -0
  105. data/test/run-test.rb +34 -0
  106. data/test/test_acts_as_tree.rb +60 -0
  107. data/test/test_adapter.rb +121 -0
  108. data/test/test_associations.rb +701 -0
  109. data/test/test_attributes.rb +117 -0
  110. data/test/test_base.rb +1214 -0
  111. data/test/test_base_per_instance.rb +61 -0
  112. data/test/test_bind.rb +62 -0
  113. data/test/test_callback.rb +31 -0
  114. data/test/test_configuration.rb +40 -0
  115. data/test/test_connection.rb +82 -0
  116. data/test/test_connection_per_class.rb +112 -0
  117. data/test/test_connection_per_dn.rb +112 -0
  118. data/test/test_dirty.rb +98 -0
  119. data/test/test_dn.rb +172 -0
  120. data/test/test_find.rb +176 -0
  121. data/test/test_groupadd.rb +50 -0
  122. data/test/test_groupdel.rb +46 -0
  123. data/test/test_groupls.rb +107 -0
  124. data/test/test_groupmod.rb +51 -0
  125. data/test/test_ldif.rb +1890 -0
  126. data/test/test_load.rb +133 -0
  127. data/test/test_lpasswd.rb +75 -0
  128. data/test/test_object_class.rb +74 -0
  129. data/test/test_persistence.rb +131 -0
  130. data/test/test_reflection.rb +175 -0
  131. data/test/test_schema.rb +559 -0
  132. data/test/test_syntax.rb +444 -0
  133. data/test/test_user.rb +217 -0
  134. data/test/test_user_password.rb +108 -0
  135. data/test/test_useradd-binary.rb +62 -0
  136. data/test/test_useradd.rb +57 -0
  137. data/test/test_userdel.rb +48 -0
  138. data/test/test_userls.rb +91 -0
  139. data/test/test_usermod-binary-add-time.rb +65 -0
  140. data/test/test_usermod-binary-add.rb +64 -0
  141. data/test/test_usermod-binary-del.rb +66 -0
  142. data/test/test_usermod-lang-add.rb +59 -0
  143. data/test/test_usermod.rb +58 -0
  144. data/test/test_validation.rb +274 -0
  145. metadata +379 -0
@@ -0,0 +1,54 @@
1
+ h1. Development
2
+
3
+ Here is information for developers.
4
+
5
+ h2. Repository
6
+
7
+ ActiveLdap uses ["git repository on
8
+ GitHub":https://github.com/activeldap]. Here is a
9
+ list to get each source code.
10
+
11
+ - "activeldap":https://github.com/activeldap/activeldap :=
12
+ <pre class="command">
13
+ % git clone https://github.com/activeldap/activeldap.git
14
+ </pre>
15
+ =:
16
+ - "al-admin":https://github.com/activeldap/al-admin :=
17
+ <pre class="command">
18
+ % git clone https://github.com/activeldap/al-admin.git
19
+ </pre>
20
+ =:
21
+
22
+ h2. Issues
23
+
24
+ ActiveLdap uses "Issues on
25
+ GitHub":https://github.com/activeldap/activeldap/issues for
26
+ issue tracking. Please submit a issue when you find an
27
+ issue.
28
+
29
+ h2. Rails 3 support
30
+
31
+ Here is design about Rails 3 support.
32
+
33
+ h3. must
34
+
35
+ * We add active_ldap/test_help.rb to support ActiveLdap fixture.
36
+ We don't write same codes into test_helper.rb like
37
+ http://ruby-activeldap.rubyforge.org/activeldap-fabrication/en/#Install
38
+
39
+ h3. may
40
+
41
+ * We support Warden.
42
+ * We support Devise
43
+ * We support OmniAuth. (instead of Warden)
44
+
45
+ h3. DONE
46
+
47
+ * We don't support Rails 3.0.x.
48
+ * We provide active_ldap/railtie to initialize ActiveLdap.
49
+ * We remove ActiveRecord dependency.
50
+ * We depend on ActiveModel instead of ActiveRecord.
51
+ * We target to Rails 3.1.0. (Yes, it's not released yet
52
+ but it will be released before we support Rails 3.x.)
53
+ * We update the documentation and ensure that the procedure
54
+ for including ActiveLdap in a Rails 3 project is correct.
@@ -0,0 +1,811 @@
1
+ h1. News
2
+
3
+ h2(#3-2-2). 3.2.2: 2012-09-01
4
+
5
+ * Supported entry creation by direct ActiveLdap::Base use.
6
+ [Reported by Craig White]
7
+ * Started to use Travis CI.
8
+
9
+ h3. Thanks
10
+
11
+ * Craig White
12
+
13
+ h2(#3-2-1). 3.2.1: 2012-08-31
14
+
15
+ * Fixed a bug that ActiveLdap::Base#delete doesn't work.
16
+ [Reported by Craig White]
17
+
18
+ h3. Thanks
19
+
20
+ * Craig White
21
+
22
+ h2(#3-2-0). 3.2.0: 2012-08-29
23
+
24
+ * [GitHub:#39] Supported Rails 3.2.8. [Reported by Ben Langfeld]
25
+ * [GitHub:#13] Don't use deprecated Gem.available?. [Patch by sailesh]
26
+ * [GitHub:#19] Supported new entry by @ha_many :wrap@. [Patch by Alex Tomlins]
27
+ * Supported @:only@ option in XML output.
28
+ * [GitHub:#14] Supported nil as single value. [Reported by n3llyb0y]
29
+ * [GitHub:#20] Supported ActiveModel::MassAssignmentSecurity.
30
+ [Reported by mihu]
31
+ * [GitHub:#24] Supported Ruby 1.9 style Hash syntax in generator.
32
+ [Patch by ursm]
33
+ * [GitHub:#25][GitHub:#39] Supported ActiveModel::Dirty.
34
+ [Patch by mihu][Reported by Ben Langfeld]
35
+ * [GitHub:#26] Improved speed for dirty. [Patch by mihu]
36
+ * [GitHub:#28] Improved speed for initialization. [Patch by mihu]
37
+ * [GitHub:#29] Added .gemspec. [Suggested by mklappstuhl]
38
+ * [GitHub:#34] Removed an unused method. [Patch by mihu]
39
+ * [GitHub:#37] Improved will_paginate support. [Patch by Craig White]
40
+ * [GitHub:#40] Added missing test files to .gemspec. [Reported by Vít Ondruch]
41
+ * [GitHub:#41] Improved speed for find. [Patch by unixmechanic]
42
+ * Changed i18n backend to gettext from fast_gettext again.
43
+ * [GitHub:#42] Fixed a bug that optional second is required for GeneralizedTime.
44
+ [Reported by masche842]
45
+
46
+ h3. Thanks
47
+
48
+ * sailesh
49
+ * Alex Tomlins
50
+ * n3llyb0y
51
+ * mihu
52
+ * ursm
53
+ * Ben Langfeld
54
+ * mklappstuhl
55
+ * Craig White
56
+ * Vít Ondruch
57
+ * unixmechanic
58
+ * masche842
59
+
60
+ h2(#3-1-1). 3.1.1: 2011-11-03
61
+
62
+ * Supported Rails 3.1.1.
63
+ * [GitHub:#9] Fixed a typo in document. [warden]
64
+ * [GitHub:#11] Added persisted?. [bklier]
65
+ * [GitHub:#16] Supported 4 or more bytes salt for SSHA and SMD5.
66
+ [Alex Tomlins]
67
+
68
+ h3. Thanks
69
+
70
+ * warden
71
+ * bklier
72
+ * Alex Tomlins
73
+
74
+ h2(#3-1-0). 3.1.0: 2011-07-09
75
+
76
+ * Supported Rails 3.1.0.rc4.
77
+ [Ryan Tandy, Narihiro Nakamura, Hidetoshi Yoshimoto]
78
+ * Removed ActiveRecord dependency and added ActiveModel dependency.
79
+ * Used YARD instead of RDoc as documentation sysytem.
80
+
81
+ h2. 1.2.4: 2011-05-13
82
+
83
+ * Splited AL-Admin into other repository: https://github.com/activeldap/al-admin
84
+ * [GitHub:#2] Fixed "path po cound not be found" error by fast_gettext.
85
+ [rbq]
86
+
87
+ h2. 1.2.3: 2011-04-30
88
+
89
+ * [#40] Ignored nil value attribute.
90
+ [christian.pennafort]
91
+ * [#48] Escaped ":" in filter value.
92
+ [planetmcd]
93
+ * Added missing rubygems require.
94
+ [spoidar]
95
+ * Used fast_gettext instead of gettext.
96
+ [Peter Fern]
97
+ * Supported Rails 2.3.11.
98
+ [Kris Wehner]
99
+ * Fixed wrong assertion in test.
100
+ [Ryan Tandy]
101
+
102
+ h3. Thanks
103
+
104
+ * christian.pennafort
105
+ * planetmcd
106
+ * spoidar
107
+ * Peter Fern
108
+ * Kris Wehner
109
+ * Ryan Tandy
110
+
111
+ h2. 1.2.2: 2010-07-04
112
+
113
+ * Supported ActiveRecord 2.3.8 and Rails 2.3.8.
114
+ * [#37] Fixed gem dependencies in Rakefile. [zachwily]
115
+ * Fixed a bug that setting 'false' but 'nil' is returned. [Hideyuki Yasuda]
116
+ * Supported non-String attribute value as LDIF value. [Matt Mencel]
117
+ * Worked with a LDAP server that uses 'objectclass' not 'objectClass' as
118
+ objectClass attribute name. [Tim Hermans]
119
+ * [#41] Provide SASL-option support, primarily for authzid
120
+ [Anthony M. Martinez]
121
+ * [#43] Error with to_xml [ilusi0n.x]
122
+ * [#44] Accept '0' and '1' as boolean value [projekttabla]
123
+ * [#27429] Fixed inverted validatation by validate_excluded_classes
124
+ [Marc Dequènes]
125
+ * Supported DN attribute value for assosiation replacement.
126
+ [Jörg Herzinger]
127
+
128
+ h2. 1.2.1: 2009-12-15
129
+
130
+ * Supported ActiveRecord 2.3.5 and Rails 2.3.5.
131
+ * Supported GetText 2.1.0 and Locale 2.0.5.
132
+ * belongs_to(:many) support DN attribute.
133
+ * [#31] ActiveLdap::Base#attributes returns data that reflects
134
+ schema definition. [Alexey.Chebotar]
135
+ * blocks DN attribute change by mass assignment with :id => ....
136
+ * [#35] fix has_many association is broken. [culturespy]
137
+ * Supported nested attribute options. [Hideyuki Yasuda]
138
+
139
+ h2. 1.2.0: 2009-09-22
140
+
141
+ * Supported ActiveRecord 2.3.4 and Rails 2.3.4.
142
+ * [IMCOMPATIBLE]
143
+ [#23932] Inconsistant DN handling in object attributes [Marc Dequènes]
144
+ (ActiveLdap::Base#dn and ActiveLdap::Base#base return
145
+ ActiveLdap::DN not String)
146
+ * [#26824] support operational attributes detection [Marc Dequènes]
147
+ (added ActiveLdap::Schema::Attribute#directory_operation?)
148
+ * [#27] Error saving an ActiveLDAP user [brad@lucky-dip.net]
149
+ * [#29] Raised on modify_rdn_entry when rdn already exists [Alexey.Chebotar]
150
+ * Added ActiveLdap::DN.parent.
151
+ * Supported renaming an entry. Renaming other DTI is only supported by
152
+ JNDI backend.
153
+
154
+ h2. 1.1.0: 2009-07-18
155
+
156
+ * Improved tutorial. [Kazuaki Takase]
157
+ * Improvements:
158
+ ** API:
159
+ *** [#26] Supported to_xml for associations. [achemze]
160
+ *** ActiveLdap::Base.delete_all(filter=nil, options={}) ->
161
+ ActiveLdap::Base.delete_all(filter_or_options={}).
162
+ Sure, old method signature is also still supported.
163
+ *** belongs_to(:many) with :foreign_key is deprecated.
164
+ Use :primary_key instead of :foreign_key. [Kazuaki Takase]
165
+ *** Means of has_many's :primary_key and :foreign_key are inverted.
166
+ [Kazuaki Takase]
167
+ *** [experimental] Added ldap_field ActionView helper to
168
+ generate form fileds for a LDAP entry.
169
+ ** Suppressed needless attributes updating.
170
+ * Dependencies:
171
+ ** Re-supported GetText.
172
+ ** ActiveRecord 2.3.2 is only supported.
173
+
174
+ h2. 1.0.9
175
+
176
+ * Added documents in Japanese. [Kazuaki Takase]
177
+ * Supported Ruby 1.9.1.
178
+ ** [#20] [Ruby 1.9 Support] :: Running Tests [Alexey.Chebotar]
179
+ * Supported Rails 2.3.2.
180
+ ** [#18] [Rails 2.3 Support] :: Running WEBrick Hangs [Alexey.Chebotar]
181
+ * Bug fixes:
182
+ ** Fixed blank values detection. [David Morton]
183
+ ** [#22] Ruby 1.8.6 p287 :: Undefined methods [Alexey.Chebotar]
184
+ ** Fixed gem loading. [Tiago Fernandes]
185
+ ** Fixed DN change via #base=. [David Morton]
186
+ ** Fixed infinite retry on timeout.
187
+ ** Fixed needless reconnection.
188
+ * API improvements:
189
+ ** Removed needless instance methods: #prefix=,
190
+ #dn_attribute=, #sort_by=, #order=, #required_classes=,
191
+ #recommended_classes= and #excluded_classes. [David Morton]
192
+ ** Removed obsolete scafoold_al generator.
193
+ ** Reduced default :retry_limit.
194
+ ** Supported association as parameter. [Joe Francis]
195
+ ** Normalized schema attribute name. [Tim Hermans]
196
+ ** Suppressed AuthenticationError -> ConnectionError
197
+ conversion on reconnection. [Kazuaki Takase]
198
+ ** Added ActiveLdap::Schema#dump.
199
+ ** ActiveLdap::Base.establish_connection ->
200
+ ActiveLdap::Base.setup_connection.
201
+ ** Supported ActiveLdap::Base.find(:last).
202
+ ** Added convenient methods:
203
+ *** ActiveLdap::Base.first
204
+ *** ActiveLdap::Base.last
205
+ *** ActiveLdap::Base.all
206
+
207
+ h2. 1.0.2
208
+
209
+ * Removed Base64 module use.
210
+ * Improved LDIF parser.
211
+ * Improved scheme parser.
212
+ * Supported Base64 in XML serialization.
213
+ * Supported TLS options.
214
+ * Supported ActiveRecord 2.2.2.
215
+ * Supported Ruby on Rails 2.2.2.
216
+ * Used rails/init.rb and rails_generators/ directory structure convention
217
+ for Rails and gem. rails/ directory will be removed after 1.0.2 is released.
218
+ * AL-Admin migrated to Ruby on Rails 2.2.2 form 2.0.2.
219
+ * Improved ActiveDirectory integration.
220
+ * Accepted :class_name for belong_to and has_many option.
221
+ * Improved default port guess.
222
+ * Bug fixes:
223
+ ** [#4] ModifyRecord#load doesn't operate atomic. [gwarf12]
224
+ ** [#5] to_xml supports :except option. [baptiste.grenier]
225
+ ** [#6] to_xml uses ActiveResource format. [baptiste.grenier]
226
+ ** Out of ranged GeneralizedTime uses Time.at(0) as fallback value.
227
+ [Richard Nicholas]
228
+ ** ActiveLdap::Base#to_s uses #to_ldif. [Kazuhiro NISHIYAMA]
229
+ ** Fixed excess prefix extraction. [Grzegorz Marszałek]
230
+ ** Skiped read only attribute validation. [しまさわらさん]
231
+ ** Treated "" as empty value. [Ted Lepich]
232
+ ** [#9][#16] Reduced raising when DN value is invalid.
233
+ [danger1986][Alexey.Chebotar]
234
+ ** [#10][#12] Fixed needless ',' is appeared. [michael.j.konopka]
235
+ ** [#11] Required missing 'active_ldap/user_password'. [michael.j.konopka]
236
+ ** [#13] Returned entries if has_many :wrap has nonexistent entry.
237
+ [ingersoll]
238
+ ** [#15] Fixed type error on computing DN. [ery.lee]
239
+ ** ">=" filter operator doesn't work. [id:dicdak]
240
+ ** [#17] ActiveLdap::Base.create doesn't raise exception. [Alexey.Chebotar]
241
+
242
+ h2. 1.0.1
243
+
244
+ * Fixed GetText integration.
245
+ * Fixed ActiveLdap::Base.find with ActiveLdap::DN. (Reported by Jeremy Pruitt)
246
+ * Fixed associated bugs. (Reported by CultureSpy)
247
+ * Supported ActiveLdap::Base#attribute_present? with nonexistence attribute.
248
+ (Reported by Matt Mencel)
249
+ * Added ActiveLdap::Base#.to_ldif_record.
250
+ * Improved inspect.
251
+ * Supported ActiveSupport 2.1.0.
252
+
253
+ h2. 1.0.0
254
+
255
+ * Fixed GSSAPI auth failure. [#18764] (Reported by Lennon Day-Reynolds)
256
+ * Supported Symbol as :dn_attribute_value. [#18921] (Requested by Nobody)
257
+ * Improved DN attribute detection. (Reported by Iain Pople)
258
+ * Avoided unnecesally modify operation. (Reported by Tilo)
259
+
260
+ h2. 0.10.0
261
+
262
+ * Implemented LDIF parser.
263
+ * Improved validation:
264
+ ** Added some validations.
265
+ ** Fixed SINGLE-VALUE validation. [#17763]
266
+ (Reported by Naoto Morishima)
267
+ * Supported JNDI as backend.
268
+ * Improved auto reconnection.
269
+ * Supported Rails 2.0.2.
270
+ * Improved performance. (4x)
271
+ * [API CHANGE]: removed "'binary' =>" from getter result.
272
+
273
+ <pre>
274
+ !!!plain
275
+ e.g.:
276
+ before:
277
+ user.user_certificate # => {"binary" => "..."}
278
+ now:
279
+ user.user_certificate # => "..."
280
+ </pre>
281
+
282
+ * Added :excluded_classed ldap_mapping option.
283
+ * Logged operation time used for LDAP operation.
284
+ * Improved API:
285
+ ** Accepted non String value for find(:value => XXX).
286
+ (Suggested by Marc Dequèn)
287
+ ** Accepted DN as ActiveLdap::Base.new(XXX).
288
+ (Reported by Jeremy Pruitt)
289
+ ** Treated empty password for smiple bind as anonymous bind.
290
+ (Suggested by Bodaniel Jeans)
291
+ ** Ensured adding "objectClass" for find's :attribute value. [#16946]
292
+ (Suggested by Nobody)
293
+ ** Fixed a GeneralizedTime type casting bug.
294
+ (Reported by Bodaniel Jeanes)
295
+ ** Supported :base and :prefix search/find option value escaping.
296
+ (Suggested by David Morton)
297
+
298
+ h2. 0.9.0
299
+
300
+ * Improved DN handling.
301
+ * Supported attribute value validation by LDAP schema.
302
+ * Changed RubyGems name: ruby-activeldap -> activeldap.
303
+ * Removed Log4r dependency.
304
+ * Supported lazy connection establishing.
305
+ ** [API CHANGE]: establish_connection doesn't connect LDAP server.
306
+ * [API CHANGE]: Removed ActiveLdap::Base#establish_connection.
307
+ * Added ActiveLdap::Base#bind. (use this instead of #establish_connection)
308
+ * Supported implicit acts_as_tree.
309
+ * [API CHANGE]: Supported type casting.
310
+ * Supported :uri option in configuration.
311
+ * Improved Rails integration:
312
+ ** Followed Rails 2.0 changes.
313
+ ** AL-Admin:
314
+ *** Supported lang parameter in URL.
315
+ *** Improved design a bit. (Please someone help us!)
316
+ *** Supported schema inspection.
317
+ *** Supported objectClass modifiation.
318
+ ** Rails plugin:
319
+ *** Added ActiveLdap::VERSION check.
320
+ *** Added model_active_ldap generator.
321
+ *** Renamed scaffold_al generator to scaffold_active_ldap.
322
+
323
+ h2. 0.8.3
324
+
325
+ * Added AL-Admin Sample Rails app
326
+ * Added Ruby-GetText-Package support
327
+ * Added a Rails plugin
328
+ * Improved schema handling
329
+ * Improved performance
330
+ * Many bug fixes
331
+
332
+ h2. 0.8.2
333
+
334
+ * Added Net::LDAP support!
335
+ ** supported SASL Digest-MD5 authentication with Net::LDAP.
336
+ * improved LDAP server support:
337
+ ** improved Sun DS support.
338
+ ** improved ActiveDirectory support. Thanks to Ernie Miller!
339
+ ** improved Fedora-DS support. Thanks to Daniel Pfile!
340
+ * improved existing functions:
341
+ ** improved DN handling. Thanks to James Hughes!
342
+ ** improved SASL bind.
343
+ ** improved old API check.
344
+ ** improved schema handling. Thanks to Christoph Lipp!
345
+ ** improved filter notification.
346
+ * updated documents:
347
+ ** updated Rails realted documenation. Thanks to James Hughes!
348
+ ** updated documentation for the changes between 0.7.1 and 0.8.0.
349
+ Thanks to Buzz Chopra!
350
+ * added new features:
351
+ ** added scaffold_al generator for Rails.
352
+ ** added required_classes to default filter value. Thanks to Jeff Hall!
353
+ ** added :recommended_classes option to ldap_mapping.
354
+ ** added :sort_by and :order options to find.
355
+ ** added ActiveLdap::Base#to_param for ActionController.
356
+ * fixed some bugs:
357
+ ** fixed rake install/uninstall.
358
+ ** fixed typos. Thanks to Nobody!
359
+ ** fixed required_classes initialization. Thanks to James Hughes!
360
+
361
+ h2. 0.8.1
362
+
363
+ * used Dependencies.load_paths.
364
+ * check whether attribute name is available or not.
365
+ * added test for find(:first, :attribute => 'xxx', :value => 'yyy').
366
+ * supported ActiveSupport 1.4.0.
367
+ * make the dual licensing of ruby-activeldap clear in the README.
368
+ * followed edge Rails: don't use Reloadable::Subclasses if doesn't need.
369
+ * added examples/.
370
+ * removed debug code.
371
+ * normalized attribute name to support wrong attribute names in MUST/MAY.
372
+ * supported getting dn value by Base#[].
373
+ * test/test_userls.rb: followed userls changes.
374
+ * update the doc href.
375
+ * provide a dumb example of how to use the old association(return_objects) style API with the new awesome API.
376
+ * followed new API.
377
+ * removed a finished task: support Reloadable::Subclasses.
378
+
379
+ h2. 0.8.0
380
+
381
+ * Makefile/gemspec system replaced with Rakefile + Hoe
382
+ * Bugfix: Allow base to be empty
383
+ * Add support for Date, DateTime, and Time objects (patch from Patrick Cole)
384
+ * Add support for a :filter argument to override the default attr=val LDAP search filter in find_all() and find() (patch from Patrick Cole)
385
+ * Add Base#update_attributes(hash) method which does bulk updates to attributes (patch from Patrick Cole) and saves immediately
386
+ * API CHANGE: #attributes now returns a Hash of attribute_name => clone(attribute_val)
387
+ * API CHANGE: #attribute_names now returns an alphabetically sorted list of attribute names
388
+ * API CHANGE;
389
+ * Added attributes=() as the implementation for update_attributes(hash) (without autosave)
390
+ * API TRANSITION: Base#write is now deprecated. Please use Base#save
391
+ * API TRANSITION: Added SaveError exception (which is a subclass of WriteError for now)
392
+ * API TRANSITION: Base.connect() is now deprecated. Please use Base.establish_connection()
393
+ * API TRANSITION: Base.close() is now deprecated. Please use Base.remove_connection()
394
+ * API TRANSITION: :bind_format and :user of Base.establish_connection() are now deprecated. Please use :bind_dn
395
+ * Added update_attribute(name, value) to update one attribute and save immediately
396
+ * #delete -> #destroy
397
+ * Base.destroy_all
398
+ * Base.delete(id) & Base.delete_all(filter)
399
+ * add Base.exists?(dnattr_val)
400
+ * attr_protected
401
+ * Base.update(dnattr_val, attributes_hash) - instantiate, update, save, return
402
+ * Base.update_all(updates_hash, filter)
403
+ * attribute_present?(attribute) - if not empty/nil
404
+ * has_attribute?(attr_name) - if in hash
405
+ * reload() (refetch from LDAP)
406
+ * make save() return false on fail
407
+ * make save!() raise EntryNotSaved exception
408
+ * to_xml()
409
+ * clear_active_connections!() -- Conn per class
410
+ ** make @@active_connections and name them by
411
+ * base_class() (just return the ancestor)
412
+ * Separate ObjectClass changes to live in ActiveLDAP::ObjectClass
413
+ ** add_objectclass
414
+ ** remove_objectclass
415
+ ** replace_objectclass
416
+ ** disallow direct objectclass access?
417
+ * support ActiveRecord::Validations.
418
+ * support ActiveRecord::Callbacks.
419
+ * rename to ActiveLdap from ActiveLDAP to integrate RoR easily and enforce
420
+ many API changes.
421
+
422
+ h2. 0.7.4
423
+
424
+ * Bugfix: do not base LDAP::PrettyError on RuntimeError due to rescue evaluation.
425
+ * Bugfix: :return_objects was overriding :objects in find and find_all
426
+ * Rollup exception code into smaller space reusing similar code.
427
+
428
+ h2. 0.7.3
429
+
430
+ * Made has_many and belongs_to use :return_objects value
431
+ * Force generation of LDAP constants on import - currently broken
432
+
433
+ h2. 0.7.2
434
+
435
+ * Stopped overriding Conn.schema in ldap/schema - now use schema2
436
+ * Fix attributes being deleted when changing between objectclasses with shared attributes
437
+ * Added schema attribute case insensitivity
438
+ * Added case insensitivity to the attribute methods.
439
+ * Added LDAP scope override support to ldap_mapping via :scope argument. (ldap_mapping :scope => LDAP::LDAP_SCOPE_SUBTREE, ...)
440
+ * Fixed the bug where Klass.find() return nil (default arg for find/find_all now '*')
441
+ * Added :return_objects to Base.connect()/configuration.rb -- When true, sets the default behavior in Base.find/find_all to return objects instead of just the dnattr string.
442
+ * Hid away several exposed private class methods (do_bind, etc)
443
+ * Undefined dnattr for a class now raises a ConfigurationError
444
+ * Centralized all connection management code where possible
445
+ * Added Base.can_reconnect? which returns true if never connected or below the :retries limit
446
+ * Added block support to Base.connection to ensure "safe" connection usage. This is not just for internal library use. If you need to do something fancy with the connection object, use Base.connection do |conn| ...
447
+ * Fixed object instantiation in Base#initialize when using full DNs
448
+ * Added :parent_class option to ldap_mapping which allows for object.parent() to return an instantiated object using the parent DN. (ldap_mapping :parent_class => String, ...)
449
+ * Fixed reconnect bug in Base#initialize (didn't respect infinite retries)
450
+ * Added(*) :timeout argument to allow timeouts on hanging LDAP connections
451
+ * Added(*) :retry_on_timeout boolean option to allow disabling retries on timeouts
452
+ * Added TimeoutError
453
+ * Added(*) a forking timeout using SIGALRM to interrupt handling.
454
+ * (*) Only works when RUBY_PLATFORM has "linux" in it
455
+
456
+ h2. 0.7.1
457
+
458
+ * Fix broken -W0 arg in activeldap.rb
459
+ * attribute_method=: '' and nil converted to ldap-pleasing [] values
460
+ * Added checks in write and search for connection down (to reconnect)
461
+ * Fixed broken idea of LDAP::err2string exceptions. Instead took errcodes from ldap.c in Ruby/LDAP.
462
+
463
+ h2. 0.7.0
464
+
465
+ * ConnectionError thrown from #initialize when there is no connection and retry limit was exceeded
466
+ * ConnectionError thrown when retries exceeded when no connection was created
467
+ * Separated connection types: SSL, TLS, and plain using :method
468
+ * Localized reconnect logic into Base.reconnect(force=false)
469
+ * Fixed password_block evaluation bug in do_bind() which broke SIMPLE re-binds and broke reconnect
470
+ * Add support for config[:sasl_quiet] in Base.connect
471
+ * (Delayed a case sensitivity patch for object classes and attributes due to weird errors)
472
+ * Add :retry_wait to Base.connect to determine the timeout before retrying a connection
473
+ * Fixed ActiveLDAP::Base.create_object() - classes were enclosed in quotes
474
+ * Added :ldap_scope Base.connect() argument to allow risk-seeking users to change the LDAP scope to something other than ONELEVEL.
475
+ * Cleaned up Configuration.rb to supply all default values for ActiveLDAP::Base.connect() and to use a constant instead of overriding class variables for no good reason.
476
+ * Added scrubbing for :base argument into Base.connect() to make sure a ' doesn't get evaluated.
477
+ * Refactored Base.connect(). It is now much cleaner and easier to follow.
478
+ * Moved schema retrieval to after bind in case a server requires privileges to access it.
479
+ * Reworked the bind process to be a little prettier. A lot of work to do here still.
480
+ * Added LDAP::err2exception(errno) which is the groundwork of a coming overhaul in user friendly error handling.
481
+ * Added support for Base::connect(.., :password => String, ...) to avoid stupid Proc.new {'foo'} crap
482
+ * Add :store_password option. When this is set, :password is not cleared and :password_block is not re-evaluated on each rebind.
483
+
484
+ h2. 0.6.0
485
+
486
+ * Disallow blank DN attribute values on initialization
487
+ * Fix bug reported by Maik Schmidt regarding object creation
488
+ * Added error checking to disallow DN attribute value changes
489
+ * Added AttributeAssignmentError (for above)
490
+ * Import() and initialize() no longer call attribute_method=()
491
+ * Added error condition if connection fails inside initialize()
492
+ * Changes examples and tests to use "dc=localdomain"
493
+ * has_many() entries no longer return nil when empty
494
+
495
+ h2. 0.5.9
496
+
497
+ * Change default base to dc=localdomain (as per Debian default).
498
+ * schema2.rb:attr() now returns [] instead of '' when empty.
499
+ * Lookup of new objects does not put dnattr()=value into the Base on lookup.
500
+ * Scope is now use ONELEVEL instead of SUBTREE as it broke object boundaries.
501
+ * Fixed @max_retries misuse.
502
+ * Added do_connect retries.
503
+ * Fixed find and find_all for the case - find_all('*').
504
+ * Fixed broken creation of objects from anonymous classes.
505
+ * Fixed broken use of ldap_mapping with anonymous classes.
506
+
507
+ h2. 0.5.8: Bugfix galore
508
+
509
+ * Allow nil "prefix"
510
+ * Fixed the dup bug with Anonymous patch.
511
+ * (maybe) Fixed stale connection problems by attempting reconn/bind.
512
+ * Hiding redefine warnings (for now)
513
+
514
+ h2. 0.5.7
515
+
516
+ * Fixed the @data.default = [] bug that daniel@nightrunner.com pointed out
517
+ (and partially patched).
518
+
519
+ h2. 0.5.6
520
+
521
+ * Added support for foreign_key => 'dn' in has_many.
522
+
523
+ h2. 0.5.5
524
+
525
+ * Remove @@logger.debug entries during build
526
+ * Building -debug and regular gems and tarballs
527
+
528
+ h2. 0.5.4
529
+
530
+ * Added Base#import to streamline the Base.find and Base.find_all methods
531
+ ** Speeds up find and find_all by not accessing LDAP multiple times
532
+ for data we already have.
533
+ * Added tests/benchmark which is a slightly modified version of excellent
534
+ benchmarking code contributed by
535
+ Ollivier Robert <roberto -_-AT-_- keltia.freenix.fr>.
536
+
537
+ h2. 0.5.3
538
+
539
+ * Changed attribute_method to send in associations
540
+ ** fixes belongs_to (with local_kay) and inheritance around that
541
+
542
+ h2. 0.5.2
543
+
544
+ * Make sure values are .dup'd when they come from LDAP
545
+
546
+ h2. 0.5.1
547
+
548
+ * Changed Schema2#class_attributes to return @{:must => [], :may => []}@
549
+ * Fixed Base#must and Base#may to return with full SUPerclass requirements
550
+
551
+ h2. 0.5.0
552
+
553
+ * API CHANGE (as with all 0.x.0 changes) (towards ActiveRecord duck typing)
554
+ ** Base#ldapattribute now always returns an array
555
+ ** Base#ldapattribute(true) now returns a dup of an array, string, etc
556
+ when appropriate (old default) - This is just for convenience
557
+ ** Base#ldapattribute returns the stored value, not just a .dup
558
+ ** Associations methods return objects by default instead of just names.
559
+ Group.new('foo').members(false) will return names only.
560
+ ** Base.connect returns true as one might expect
561
+ * Value validation and changing (binary, etc) occur prior to write, and
562
+ not immediately on attribute_method=(value).
563
+ * Attribute method validity is now determined /on-the-fly/.
564
+ * Default log level set to OFF speeds up 'speedtest' by 3 seconds!
565
+ (counters last point which added some slowness :)
566
+ * Added Schema2#class_attributes which caches and fully supertype expands
567
+ attribute lists.
568
+ * Integrated Schema2#class_attributes with apply_objectclass which automagically
569
+ does SUP traversal and automagically updates available methods on calls to
570
+ #attributes, #method_missing, #validate, and #write
571
+ * Added 'attributes' to 'methods' allowing for irb autocompletion and other
572
+ normal rubyisms
573
+ * Moved almost all validation to Base#validate to avoid unexpected exceptions
574
+ being raised in seemingly unrelated method calls. This means that invalid
575
+ objectClasses may be specified. This will only be caught on #write or
576
+ a pre-emptive #validate. This goes for all attribute errors though.
577
+ This also makes it possible to "break" objects by removing the 'top'
578
+ objectclass and therefore the #objectClass method...
579
+
580
+ h2. 0.4.4
581
+
582
+ * Fixed binary subtype forcing:
583
+ ** was setting data as subtype ;binary even when not required
584
+ * Added first set of unit tests.
585
+ ** These will be cleaned up in later releases as more tests are added.
586
+ * Fixed subtype clobber non-subtype (unittest!)
587
+ ** cn and cn;lang-blah: the last loaded won
588
+ * Fixed multivalued subtypes from being shoved into a string (unittest!)
589
+ ** an error with attribute_input_value
590
+
591
+ h2. 0.4.3
592
+
593
+ * Fixed write (add) bugs introduced with last change
594
+ ** only bug fixes until unittests are in place
595
+
596
+ h2. 0.4.2
597
+
598
+ * Added ruby-activeldap.gemspec
599
+ * Integrated building a gem of 'ruby-activeldap' into Makefile.package
600
+ * Added attr parsing cache to speed up repetitive calls: approx 13x speedup
601
+ ** 100 usermod-binary-add calls
602
+
603
+ <pre>
604
+ !!!plain
605
+ Without attr parsing cache:
606
+ real 13m53.129s
607
+ user 13m11.350s
608
+ sys 0m7.030s
609
+ With attr parsing cache:
610
+ real 1m0.416s
611
+ user 0m28.390s
612
+ sys 0m2.380s
613
+ </pre>
614
+
615
+ h2. 0.4.1:
616
+
617
+ * Schema2 was not correctly parsing objectClass entries.
618
+ ** This is fixed for now but must be revisited.
619
+
620
+ h2. 0.4.0
621
+
622
+ * Added #<attribute>(arrays) argument which when true
623
+ always returns arrays. e.g.
624
+
625
+ <pre>
626
+ !!!plain
627
+ irb> user.cn(true)
628
+ => ['My Common Name']
629
+ </pre>
630
+
631
+ This makes things easier for larger programming tasks.
632
+ * Added subtype support:
633
+ ** Uses Hash objects to specify the subtype
634
+ e.g. @user.userCertificate = {'binary' => File.read('mycert.der')}@
635
+ ** Added recursive type enforcement along with the subtype handling
636
+ ** This required overhauling the #write method.
637
+ *** Please report any problems ASAP! :^)
638
+ * Added automagic binary support
639
+ ** subtype wrapping done automatically
640
+ ** relies on X-NOT-HUMAN-READABLE flag
641
+ * Added LDAP::Schema2 which is an extension of Ruby/LDAP::Schema
642
+ ** made Schema#attr generic for easy type dereferencing
643
+ * Updated rdoc in activeldap.rb
644
+ * Updated examples (poorly) to reflect new functionality
645
+ * Added several private helper functions
646
+
647
+ h2. 0.3.6
648
+
649
+ * Fixed dn attribute value extraction on find and find_all
650
+ ** these may have grabbed the wrong value if a DN attr has
651
+ multiple values.
652
+ * Fixed Base.search to return all values as arrays and update
653
+ multivalued ones correctly
654
+ * Lowered the amount of default logging to FATAL only
655
+
656
+ h2. 0.3.5
657
+
658
+ * Moved to rubyforge.org!
659
+
660
+ h2. 0.3.4
661
+
662
+ * Changed license to Ruby's
663
+
664
+ h2. 0.3.3
665
+
666
+ * Changed Base.search to return an array instead of a hash of hashes
667
+ * Change Base.search to take in a hash as its arguments
668
+
669
+ h2. 0.3.2
670
+
671
+ * Bug fix - fixed support for module'd extension classes (again!)
672
+
673
+ h2. 0.3.1
674
+
675
+ * Updated the documentation
676
+ * Fixed ignoring of attrs argument in Base.search
677
+ * Fixed mistake in groupls (using dnattr directly)
678
+ * Fixed a mistake with overzealous dup'ing
679
+
680
+ h2. 0.3.0
681
+
682
+ * MORE API CHANGES (configuration.rb, etc)
683
+ * Major overhaul to the internals!
684
+ ** removed @@BLAH[@klass] in lieu of defining
685
+ class methods which contain the required values. This
686
+ allows for clean inheritance of Base subclasses! Whew!
687
+ ** Added @@config to store the options currently in use
688
+ after a Base.connect
689
+ ** Now cache passwords for doing reconnects
690
+ ** dnattr now accessible to the outside as a class method only
691
+ * Added Base.search to wrap normal LDAP search for convenience.
692
+ ** This returns a hash of hashes with the results indexed first by
693
+ full dn, then by attribute.
694
+
695
+ h2. 0.2.0
696
+
697
+ * API CHANGES:
698
+ ** Extension classes must be defined using map_to_ldap instead of setting
699
+ random values in initialize
700
+ ** Base#find is now Base.find_all and is a class method
701
+ ** Base.find returns the first match a la Array#find
702
+ ** force_reload is gone in belongs_to and has_many created methods
703
+ ** hiding Base.new, Base.find, and Base.find_all from direct access
704
+ * added uniq to setting objectClass to avoid stupid errors
705
+ * fixed new object creation bug where attributes were added before the
706
+ objectclass resulting in a violation (Base#write)
707
+ * fixed attribute dereferencing in Base#write
708
+ * fixed bug with .dup on Fixnums
709
+ * methods created by has_many/belongs_to and find and find_all now take an
710
+ optional argument dnattr_only which will return the value of dnattr for
711
+ each result instead of a full object.
712
+ * Base.connection=(conn) added for multiplexing connections
713
+ * Added a manual to activeldap.rb which covers most usage of Ruby/ActiveLDAP
714
+ * Base.connect(:try_sasl => true) should now work with GSSAPI if you are
715
+ using OpenLDAP >= 2.1.29
716
+
717
+ h2. 0.1.8
718
+
719
+ * .dup all returned attribute values to avoid weirdness
720
+ * .dup all assigned values to avoid weirdness
721
+ * Changed default configuration.rb to use example.com
722
+
723
+ h2. 0.1.7
724
+
725
+ * Added support for non-unique DN attributes
726
+ * Added authoritative DN retrieval with 'object.dn'
727
+
728
+ h2. 0.1.6
729
+
730
+ * Added Base.close method for clearing the existing connection (despite Ruby/LDAP's lack of .close)
731
+
732
+ h2. 0.1.5
733
+
734
+ * Fixed incorrect usage of @klass in .find (should .find be a class method?)
735
+
736
+ h2. 0.1.4
737
+
738
+ * Change WARN to INFO in associations.rb for has_many
739
+
740
+ h2. 0.1.3
741
+
742
+ * Fixed class name mangling
743
+ * Added support for classes to take DNs as the initialization value
744
+
745
+ h2. 0.1.2
746
+
747
+ * Patch from Dick Davies: Try SSL before TLS
748
+ * Log4r support
749
+ * Better packaging (automated)
750
+ * Work-around for SSL stupidity
751
+ ** SSLConn doesn't check if the port it connected to is really using SSL!
752
+
753
+ h2. 0.1.1
754
+
755
+ * Dynamic table class creation
756
+ * SASL/GSSAPI disabled by default - doesn't work consistently
757
+
758
+ h2. 0.1.0
759
+
760
+ * Added foreign_key to has_many
761
+ * Added local_key to belongs_to
762
+ * Added primary_members to Group example
763
+ * Added "nil" filtering to has_many
764
+ * Packaged up with setup.rb
765
+ * Added RDocs and better comments
766
+
767
+ h2. 0.0.9
768
+
769
+ * Separated extension classes from ActiveLDAP module
770
+ * Cleaned up examples with new requires
771
+
772
+ h2. 0.0.8
773
+
774
+ * Added user and group scripting examples
775
+ ** usermod, userls, useradd, userdel
776
+ ** groupmod, groupls
777
+
778
+ h2. 0.0.7
779
+
780
+ * Cleaner authentication loop:
781
+ ** SASL (GSSAPI only), simple, anonymous
782
+ * Added allow_anonymous option added (default: false)
783
+
784
+ h2. 0.0.6
785
+
786
+ * Write support cleaned up
787
+ * Exception classes added
788
+
789
+ h2. 0.0.5
790
+
791
+ * LDAP write support added
792
+
793
+ h2. 0.0.4
794
+
795
+ * MUST and MAY data validation against schema using objectClasses
796
+
797
+ h2. 0.0.3
798
+
799
+ * LDAP attributes alias resolution and data mapping
800
+
801
+ h2. 0.0.2
802
+
803
+ * Associations: has_many and belongs_to Class methods added for Base
804
+
805
+ h2. 0.0.1
806
+
807
+ * Extension approach in place with example User and Group classes
808
+
809
+ h2. 0.0.0
810
+
811
+ * Basic LDAP read support in place with hard-coded OUs