cancancan 1.10.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/cancancan.gemspec +19 -21
  3. data/init.rb +2 -0
  4. data/lib/cancan/ability/actions.rb +93 -0
  5. data/lib/cancan/ability/rules.rb +96 -0
  6. data/lib/cancan/ability/strong_parameter_support.rb +41 -0
  7. data/lib/cancan/ability.rb +114 -146
  8. data/lib/cancan/class_matcher.rb +30 -0
  9. data/lib/cancan/conditions_matcher.rb +147 -0
  10. data/lib/cancan/config.rb +101 -0
  11. data/lib/cancan/controller_additions.rb +38 -41
  12. data/lib/cancan/controller_resource.rb +59 -215
  13. data/lib/cancan/controller_resource_builder.rb +26 -0
  14. data/lib/cancan/controller_resource_finder.rb +42 -0
  15. data/lib/cancan/controller_resource_loader.rb +120 -0
  16. data/lib/cancan/controller_resource_name_finder.rb +23 -0
  17. data/lib/cancan/controller_resource_sanitizer.rb +32 -0
  18. data/lib/cancan/exceptions.rb +25 -5
  19. data/lib/cancan/matchers.rb +17 -3
  20. data/lib/cancan/model_adapters/abstract_adapter.rb +30 -9
  21. data/lib/cancan/model_adapters/active_record_4_adapter.rb +43 -15
  22. data/lib/cancan/model_adapters/active_record_5_adapter.rb +61 -0
  23. data/lib/cancan/model_adapters/active_record_adapter.rb +157 -82
  24. data/lib/cancan/model_adapters/conditions_extractor.rb +75 -0
  25. data/lib/cancan/model_adapters/conditions_normalizer.rb +49 -0
  26. data/lib/cancan/model_adapters/default_adapter.rb +2 -0
  27. data/lib/cancan/model_adapters/sti_normalizer.rb +47 -0
  28. data/lib/cancan/model_adapters/strategies/base.rb +40 -0
  29. data/lib/cancan/model_adapters/strategies/joined_alias_each_rule_as_exists_subquery.rb +93 -0
  30. data/lib/cancan/model_adapters/strategies/joined_alias_exists_subquery.rb +31 -0
  31. data/lib/cancan/model_adapters/strategies/left_join.rb +11 -0
  32. data/lib/cancan/model_adapters/strategies/subquery.rb +18 -0
  33. data/lib/cancan/model_additions.rb +6 -3
  34. data/lib/cancan/parameter_validators.rb +9 -0
  35. data/lib/cancan/relevant.rb +29 -0
  36. data/lib/cancan/rule.rb +79 -91
  37. data/lib/cancan/rules_compressor.rb +23 -0
  38. data/lib/cancan/sti_detector.rb +12 -0
  39. data/lib/cancan/unauthorized_message_resolver.rb +24 -0
  40. data/lib/cancan/version.rb +3 -1
  41. data/lib/cancan.rb +16 -12
  42. data/lib/cancancan.rb +2 -0
  43. data/lib/generators/cancan/ability/ability_generator.rb +4 -2
  44. data/lib/generators/cancan/ability/templates/ability.rb +9 -9
  45. metadata +82 -93
  46. data/.gitignore +0 -15
  47. data/.rspec +0 -1
  48. data/.travis.yml +0 -48
  49. data/Appraisals +0 -135
  50. data/CHANGELOG.rdoc +0 -495
  51. data/CONTRIBUTING.md +0 -23
  52. data/Gemfile +0 -3
  53. data/LICENSE +0 -22
  54. data/README.md +0 -197
  55. data/Rakefile +0 -9
  56. data/gemfiles/activerecord_3.0.gemfile +0 -18
  57. data/gemfiles/activerecord_3.1.gemfile +0 -20
  58. data/gemfiles/activerecord_3.2.gemfile +0 -20
  59. data/gemfiles/activerecord_4.0.gemfile +0 -17
  60. data/gemfiles/activerecord_4.1.gemfile +0 -17
  61. data/gemfiles/activerecord_4.2.gemfile +0 -17
  62. data/gemfiles/datamapper_1.x.gemfile +0 -14
  63. data/gemfiles/mongoid_2.x.gemfile +0 -20
  64. data/gemfiles/sequel_3.x.gemfile +0 -20
  65. data/lib/cancan/inherited_resource.rb +0 -20
  66. data/lib/cancan/model_adapters/active_record_3_adapter.rb +0 -47
  67. data/lib/cancan/model_adapters/data_mapper_adapter.rb +0 -34
  68. data/lib/cancan/model_adapters/mongoid_adapter.rb +0 -54
  69. data/lib/cancan/model_adapters/sequel_adapter.rb +0 -87
  70. data/spec/README.rdoc +0 -27
  71. data/spec/cancan/ability_spec.rb +0 -487
  72. data/spec/cancan/controller_additions_spec.rb +0 -141
  73. data/spec/cancan/controller_resource_spec.rb +0 -648
  74. data/spec/cancan/exceptions_spec.rb +0 -58
  75. data/spec/cancan/inherited_resource_spec.rb +0 -71
  76. data/spec/cancan/matchers_spec.rb +0 -29
  77. data/spec/cancan/model_adapters/active_record_4_adapter_spec.rb +0 -40
  78. data/spec/cancan/model_adapters/active_record_adapter_spec.rb +0 -446
  79. data/spec/cancan/model_adapters/data_mapper_adapter_spec.rb +0 -119
  80. data/spec/cancan/model_adapters/default_adapter_spec.rb +0 -7
  81. data/spec/cancan/model_adapters/mongoid_adapter_spec.rb +0 -227
  82. data/spec/cancan/model_adapters/sequel_adapter_spec.rb +0 -132
  83. data/spec/cancan/rule_spec.rb +0 -52
  84. data/spec/matchers.rb +0 -13
  85. data/spec/spec.opts +0 -2
  86. data/spec/spec_helper.rb +0 -27
  87. data/spec/support/ability.rb +0 -7
data/CHANGELOG.rdoc DELETED
@@ -1,495 +0,0 @@
1
- Develop
2
-
3
-
4
- 1.10.0 (January 7th, 2015)
5
-
6
- * Fix i18n issue for Ruby < 1.9.3 (bryanrite)
7
-
8
- * Fix cancancan#149 - Fix an issue loading namespaced models (darthjee)
9
-
10
- * Fix cancancan#160 - Support for Rails 4.2 (marshall-lee)
11
-
12
- * Fix cancancan#153 - More useful output in ability spec matchers (jondkinney)
13
-
14
-
15
- 1.9.2 (August 8th, 2014)
16
-
17
- * Fix cancancan#77, 78 - Fix an issue with associations for namespaced models. (jjp)
18
-
19
-
20
- 1.9.1 (July 21st, 2014)
21
-
22
- * Fix cancancan#101 - Fixes an issue where overjealous use of references would cause issues with scopes when loading associations. (bryanrite)
23
-
24
-
25
- 1.9.0 (July 20th, 2014)
26
-
27
- * Fix cancancan#59 - Parameters are automatically detected and santitized for all actions, not just create and update. (bryanrite)
28
-
29
- * Fix cancancan#97, 72, 40, 39, 26 - Support Active Record 4 properly with references on nested permissions. (scpike, tdg5, Crystark)
30
-
31
-
32
- 1.8.4 (June 24th, 2014)
33
-
34
- * Fix cancancan#86 - Fixes previous RSpec 3 update as there was a bug in the fix for RSpec 2.99. (bryanrite)
35
-
36
-
37
- 1.8.3 (June 24th, 2014)
38
-
39
- * Fix cancancan#85 - Remove deprecation notices for RSpec 3 and continue backwards compatibility. (andypike, bryanrite, porteta)
40
-
41
-
42
- 1.8.2 (June 5th, 2014)
43
-
44
- * Fix cancancan#75 - More specific hash-like object check. (bryanrite)
45
-
46
-
47
- 1.8.1 (May 27th, 2014)
48
-
49
- * Fix cancancan#67 - Sequel tests are run properly for JRuby. (bryanrite)
50
-
51
- * Fix cancancan#68 - Checks for hash-like objects in subject better. (bryanrite)
52
-
53
-
54
- 1.8.0 (May 8th, 2014)
55
-
56
- * Feature cancan#884 - Add a Sequel model adapter (szetobo)
57
-
58
- * Feature cancancan#3 - Permit "can?" check multiple subjects (cefigueiredo)
59
-
60
- * Feature cancancan#29 - Add ability to use a String that will get instance_eval'd or a Proc that will get called as the parameter method option for strong_parameter santization (svoop)
61
-
62
- * Feature cancancan#48 - Define a CanCanCan module. Even though it is not used, it is standard practice to define the module, and helpful for determining between CanCanCan and CanCan for external libraries.
63
-
64
-
65
- 1.7.1 (March 19th, 2014)
66
-
67
- * Fix ryanb/cancan#992 - Remove Rails 4 deprecations for scoped (thejchap & hitendrasingh)
68
-
69
- * Fix cancancan#16 - RSpec expectations are not explicitly required in RSpec > 2.13 (justinaiken & bryanrite)
70
-
71
-
72
- 1.7.0 (February 19th, 2014)
73
-
74
- * Feature #988 Adds support for strong_parameters (bryanrite)
75
-
76
- * Fix #726 - Allow multiple abilities with associations (elabs-dev)
77
-
78
- * Fix #864 - Fix id_param in shallow routes (francocatena)
79
-
80
- * Fix #871 - Fixes nested ability conditions (ricec)
81
-
82
- * Fix #935 - Reduce unnecessary object allocations (grosser)
83
-
84
- * Fix #966 - Fixes a variable name collision in nested conditions (knoopx)
85
-
86
- * Fix #971 - Does not execute "empty?" scope when checking class rule (matt-glover)
87
-
88
- * Fix #974 - Avoid unnecessary sql execution (inkstak)
89
-
90
-
91
- 1.6.10 (May 7, 2013)
92
-
93
- * fix matches_conditons_hash for string values on 1.8 (thanks rrosen)
94
-
95
- * work around SQL injection vulnerability in older Rails versions (thanks steerio) - issue #800
96
-
97
- * add support for nested join conditions (thanks yuszuv) - issue #806
98
-
99
- * fix load_resource "find_by" in mongoid resources (thanks albertobajo) - issue #705
100
-
101
- * fix namespace split behavior (thanks xinuc) - issue #668
102
-
103
-
104
- 1.6.9 (February 4, 2013)
105
-
106
- * fix inserting AND (NULL) to end of SQL queries (thanks jonsgreen) - issue #687
107
-
108
- * fix merge_joins for nested association hashes (thanks DavidMikeSimon) - issues #655, #560
109
-
110
- * raise error on recursive alias_action (thanks fl00r) - issue #660
111
-
112
- * fix namespace controllers not loading params (thanks andhapp) - issues #670, #664
113
-
114
-
115
- 1.6.8 (June 25, 2012)
116
-
117
- * improved support for namespaced controllers and models
118
-
119
- * pass :if and :unless options for load and authorize resource (thanks mauriciozaffari)
120
-
121
- * Travis CI badge (thanks plentz)
122
-
123
- * adding Ability#merge for combining multiple abilities (thanks rogercampos)
124
-
125
- * support for multiple MetaWhere rules (thanks andhapp)
126
-
127
- * various fixes for DataMapper, Mongoid, and Inherited Resource integration
128
-
129
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.7...1.6.8]
130
-
131
-
132
- 1.6.7 (October 4, 2011)
133
-
134
- * fixing nested resource problem caused by namespace addition - issue #482
135
-
136
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.6...1.6.7]
137
-
138
-
139
- 1.6.6 (September 28, 2011)
140
-
141
- * correct "return cant jump across threads" error when using check_authorization (thanks codeprimate) - issues #463, #469
142
-
143
- * fixing tests in development by specifying with_model version (thanks kirkconnell) - issue #476
144
-
145
- * added travis.yml file for TravisCI support (thanks bai) - issue #427
146
-
147
- * better support for namespaced models (thanks whilefalse) - issues #424
148
-
149
- * adding :id_param option to load_and_authorize_resource (thanks skhisma) - issue #425
150
-
151
- * make default unauthorized message translatable text (thanks nhocki) - issue #409
152
-
153
- * improving DataMapper behavior (thanks psanford, maxsum-corin) - issue #410, #373
154
-
155
- * allow :find_by option to be full find method name - issue #335
156
-
157
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.5...1.6.6]
158
-
159
-
160
- 1.6.5 (May 18, 2011)
161
-
162
- * pass action and subject through AccessDenied exception when :through isn't found - issue #366
163
-
164
- * many Mongoid adapter improvements (thanks rahearn, cardagin) - issues #363, #352, #343
165
-
166
- * allow :through option to work with private controller methods - issue #360
167
-
168
- * ensure Mongoid::Document is defined before loading Mongoid adapter - issue #359
169
-
170
- * many DataMapper adapter improvements (thanks emmanuel) - issue #355
171
-
172
- * handle checking nil attributes through associations (thanks thatothermitch) - issue #330
173
-
174
- * improve scope merging - issue #328
175
-
176
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.4...1.6.5]
177
-
178
-
179
- 1.6.4 (March 29, 2011)
180
-
181
- * Fixed mongoid 'or' error - see issue #322
182
-
183
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.3...1.6.4]
184
-
185
-
186
- 1.6.3 (March 25, 2011)
187
-
188
- * Make sure ActiveRecord::Relation is defined before checking conditions against it so Rails 2 is supported again - see issue #312
189
-
190
- * Return subject passed to authorize! - see issue #314
191
-
192
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.2...1.6.3]
193
-
194
-
195
- 1.6.2 (March 18, 2011)
196
-
197
- * Fixed instance loading when :singleton option is used - see issue #310
198
-
199
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.1...1.6.2]
200
-
201
-
202
- 1.6.1 (March 15, 2011)
203
-
204
- * Use Item.new instead of build_item for singleton resource so it doesn't effect database - see issue #304
205
-
206
- * Made accessible_by action default to :index and parent action default to :show instead of :read - see issue #302
207
-
208
- * Reverted Inherited Resources "collection" override since it doesn't seem to be working - see issue #305
209
-
210
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.0...1.6.1]
211
-
212
-
213
- 1.6.0 (March 11, 2011)
214
-
215
- * Added MetaWhere support - see issue #194 and #261
216
-
217
- * Allow Active Record scopes in Ability conditions - see issue #257
218
-
219
- * Added :if and :unless options to check_authorization - see issue #284
220
-
221
- * Several Inherited Resources fixes (thanks aq1018, tanordheim and stefanoverna)
222
-
223
- * Pass action name to accessible_by call when loading a collection (thanks amw)
224
-
225
- * Added :prepend option to load_and_authorize_resource to load before other filters - see issue #290
226
-
227
- * Fixed spacing issue in I18n message for multi-word model names - see issue #292
228
-
229
- * Load resource collection for any action which doesn't have an "id" parameter - see issue #296
230
-
231
- * Raise an exception when trying to make a Ability condition with both a hash of conditions and a block - see issue #269
232
-
233
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.5.1...1.6.0]
234
-
235
-
236
- 1.5.1 (January 20, 2011)
237
-
238
- * Fixing deeply nested conditions in Active Record adapter - see issue #246
239
-
240
- * Improving Mongoid support for multiple can and cannot definitions (thanks stellard) - see issue #239
241
-
242
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.5.0...1.5.1]
243
-
244
-
245
- 1.5.0 (January 11, 2011)
246
-
247
- * Added an Ability generator - see issue #170
248
-
249
- * Added DataMapper support (thanks natemueller)
250
-
251
- * Added Mongoid support (thanks bowsersenior)
252
-
253
- * Added skip_load_and_authorize_resource methods to controller class - see issue #164
254
-
255
- * Added support for uncountable resources in index action - see issue #193
256
-
257
- * Cleaned up README and added spec/README
258
-
259
- * Internal: renamed CanDefinition to Rule
260
-
261
- * Internal: added a model adapter layer for easily supporting more ORMs
262
-
263
- * Internal: added .rvmrc to auto-switch to 1.8.7 with gemset - see issue #231
264
-
265
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.4.1...1.5.0]
266
-
267
-
268
- 1.4.1 (November 12, 2010)
269
-
270
- * Renaming skip_authorization to skip_authorization_check - see issue #169
271
-
272
- * Adding :through_association option to load_resource (thanks hunterae) - see issue #171
273
-
274
- * The :shallow option now works with the :singleton option (thanks nandalopes) - see issue #187
275
-
276
- * Play nicely with quick_scopes gem (thanks ramontayag) - see issue #183
277
-
278
- * Fix odd behavior when "cache_classes = false" (thanks mphalliday) - see issue #174
279
-
280
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.4.0...1.4.1]
281
-
282
-
283
- 1.4.0 (October 5, 2010)
284
-
285
- * Adding Gemfile; to get specs running just +bundle+ and +rake+ - see issue #163
286
-
287
- * Stop at 'cannot' definition when there are no conditions - see issue #161
288
-
289
- * The :through option will now call a method with that name if instance variable doesn't exist - see issue #146
290
-
291
- * Adding :shallow option to load_resource to bring back old behavior of fetching a child without a parent
292
-
293
- * Raise AccessDenied error when loading a child and parent resource isn't found
294
-
295
- * Abilities defined on a module will apply to anything that includes that module - see issue #150 and #152
296
-
297
- * Abilities can be defined with a string of SQL in addition to a block so accessible_by works with a block - see issue #150
298
-
299
- * Adding better support for InheritedResource - see issue #23
300
-
301
- * Loading the collection instance variable (for index action) using accessible_by - see issue #137
302
-
303
- * Adding action and subject variables to I18n unauthorized message - closes #142
304
-
305
- * Adding check_authorization and skip_authorization controller class methods to ensure authorization is performed (thanks justinko) - see issue #135
306
-
307
- * Setting initial attributes based on ability conditions in new/create actions - see issue #114
308
-
309
- * Check parent attributes for nested association in index action - see issue #121
310
-
311
- * Supporting nesting in can? method using hash - see issue #121
312
-
313
- * Adding I18n support for Access Denied messages (thanks EppO) - see issue #103
314
-
315
- * Passing no arguments to +can+ definition will pass action, class, and object to block - see issue #129
316
-
317
- * Don't pass action to block in +can+ definition when using :+manage+ option - see issue #129
318
-
319
- * No longer calling block in +can+ definition when checking on class - see issue #116
320
-
321
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.4...1.4.0]
322
-
323
-
324
- 1.3.4 (August 31, 2010)
325
-
326
- * Don't stop at +cannot+ with hash conditions when checking class (thanks tamoya) - see issue #131
327
-
328
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.3...1.3.4]
329
-
330
-
331
- 1.3.3 (August 20, 2010)
332
-
333
- * Switching to Rspec namespace to remove deprecation warning in Rspec 2 - see issue #119
334
-
335
- * Pluralize nested associations for conditions in accessible_by (thanks mlooney) - see issue #123
336
-
337
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.2...1.3.3]
338
-
339
-
340
- 1.3.2 (August 7, 2010)
341
-
342
- * Fixing slice error when passing in custom resource name - see issue #112
343
-
344
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.1...1.3.2]
345
-
346
-
347
- 1.3.1 (August 6, 2010)
348
-
349
- * Fixing protected sanitize_sql error - see issue #111
350
-
351
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.0...1.3.1]
352
-
353
-
354
- 1.3.0 (August 6, 2010)
355
-
356
- * Adding :find_by option to load_resource - see issue #19
357
-
358
- * Adding :singleton option to load_resource - see issue #93
359
-
360
- * Supporting multiple resources in :through option for polymorphic associations - see issue #73
361
-
362
- * Supporting Single Table Inheritance for "can" comparisons - see issue #55
363
-
364
- * Adding :instance_name option to load/authorize_resource - see issue #44
365
-
366
- * Don't pass nil to "new" to keep MongoMapper happy - see issue #63
367
-
368
- * Parent resources are now authorized with :read action.
369
-
370
- * Changing :resource option in load/authorize_resource back to :class with ability to pass false
371
-
372
- * Removing :nested option in favor of :through option with separate load/authorize call
373
-
374
- * Moving internal logic from ResourceAuthorization to ControllerResource class
375
-
376
- * Supporting multiple "can" and "cannot" calls with accessible_by (thanks funny-falcon) - see issue #71
377
-
378
- * Supporting deeply nested aliases - see issue #98
379
-
380
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.2.0...1.3.0]
381
-
382
-
383
- 1.2.0 (July 16, 2010)
384
-
385
- * Load nested parent resources on collection actions such as "index" (thanks dohzya)
386
-
387
- * Adding :name option to load_and_authorize_resource if it does not match controller - see issue #65
388
-
389
- * Fixing issue when using accessible_by with nil can conditions (thanks jrallison) - see issue #66
390
-
391
- * Pluralize table name for belongs_to associations in can conditions hash (thanks logandk) - see issue #62
392
-
393
- * Support has_many association or arrays in can conditions hash
394
-
395
- * Adding joins clause to accessible_by when conditions are across associations
396
-
397
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.1.1...1.2.0]
398
-
399
-
400
- 1.1.1 (April 17, 2010)
401
-
402
- * Fixing behavior in Rails 3 by properly initializing ResourceAuthorization
403
-
404
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.1...1.1.1]
405
-
406
-
407
- 1.1.0 (April 17, 2010)
408
-
409
- * Supporting arrays, ranges, and nested hashes in ability conditions
410
-
411
- * Removing "unauthorized!" method in favor of "authorize!" in controllers
412
-
413
- * Adding action, subject and default_message abilities to AccessDenied exception - see issue #40
414
-
415
- * Adding caching to current_ability controller method, if you're overriding this be sure to add caching too.
416
-
417
- * Adding "accessible_by" method to Active Record for fetching records matching a specific ability
418
-
419
- * Adding conditions behavior to Ability#can and fetch with Ability#conditions - see issue #53
420
-
421
- * Renaming :class option to :resource for load_and_authorize_resource which now supports a symbol for non models - see issue #45
422
-
423
- * Properly handle Admin::AbilitiesController in params[:controller] - see issue #46
424
-
425
- * Adding be_able_to RSpec matcher (thanks dchelimsky), requires Ruby 1.8.7 or higher - see issue #54
426
-
427
- * Support additional arguments to can? which get passed to the block - see issue #48
428
-
429
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.0.2...1.1]
430
-
431
-
432
- 1.0.2 (Dec 30, 2009)
433
-
434
- * Adding clear_aliased_actions to Ability which removes previously defined actions including defaults - see issue #20
435
-
436
- * Append aliased actions (don't overwrite them) - see issue #20
437
-
438
- * Adding custom message argument to unauthorized! method (thanks tjwallace) - see issue #18
439
-
440
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.0.1...1.0.2]
441
-
442
-
443
- 1.0.1 (Dec 14, 2009)
444
-
445
- * Adding :class option to load_resource so one can customize which class to use for the model - see issue #17
446
-
447
- * Don't fetch parent of nested resource if *_id parameter is missing so it works with shallow nested routes - see issue #14
448
-
449
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.0.0...1.0.1]
450
-
451
-
452
- 1.0.0 (Dec 13, 2009)
453
-
454
- * Don't set resource instance variable if it has been set already - see issue #13
455
-
456
- * Allowing :nested option to accept an array for deep nesting
457
-
458
- * Adding :nested option to load resource method - see issue #10
459
-
460
- * Pass :only and :except options to before filters for load/authorize resource methods.
461
-
462
- * Adding :collection and :new options to load_resource method so we can specify behavior of additional actions if needed.
463
-
464
- * BACKWARDS INCOMPATIBLE: turning load and authorize resource methods into class methods which set up the before filter so they can accept additional arguments.
465
-
466
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/0.2.1...1.0.0]
467
-
468
-
469
- 0.2.1 (Nov 26, 2009)
470
-
471
- * many internal refactorings - see issues #11 and #12
472
-
473
- * adding "cannot" method to define which abilities cannot be done - see issue #7
474
-
475
- * support custom objects (usually symbols) in can definition - see issue #8
476
-
477
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/0.2.0...0.2.1]
478
-
479
-
480
- 0.2.0 (Nov 17, 2009)
481
-
482
- * fix behavior of load_and_authorize_resource for namespaced controllers - see issue #3
483
-
484
- * support arrays being passed to "can" to specify multiple actions or classes - see issue #2
485
-
486
- * adding "cannot?" method to ability, controller, and view which is inverse of "can?" - see issue #1
487
-
488
- * BACKWARDS INCOMPATIBLE: use Ability#initialize instead of 'prepare' to set up abilities - see issue #4
489
-
490
- * {see the full list of changes}[https://github.com/ryanb/cancan/compare/0.1.0...0.2.0]
491
-
492
-
493
- 0.1.0 (Nov 16, 2009)
494
-
495
- * initial release
data/CONTRIBUTING.md DELETED
@@ -1,23 +0,0 @@
1
- ## Contributing to CanCanCan
2
-
3
- ### Reporting an Issue
4
-
5
- 1. If you have any questions about CanCanCan, search the [Wiki](https://github.com/bryanrite/cancancan/wiki), use [Stack Overflow](http://stackoverflow.com/questions/tagged/cancancan), or [our mailing list](https://groups.google.com/forum/#!forum/cancancan). Do not post questions here.
6
-
7
- 1. If you find a security bug, **DO NOT** submit an issue here. Please send an e-mail to [bryan@bryanrite.com](mailto:bryan@bryanrite.com) instead.
8
-
9
- 1. Do a small search on the issues tracker before submitting your issue to see if it was already reported / fixed.
10
-
11
- 1. Create your report including Rails and CanCanCan versions. If you are getting exceptions, please include the full backtrace.
12
-
13
- That's it! The more information you give, the more easy it becomes for us to track it down and fix it. Ideal scenario would be adding the issue to CanCanCan test suite or to a sample application.
14
-
15
- ### Adding new Features or Bugfixes
16
-
17
- CanCanCan uses a [git-flow](http://nvie.com/posts/a-successful-git-branching-model/) development model. The latest "released" version of CanCanCan, the latest gem version, can always be found on `master`, while the next version or nightly is on `develop`.
18
-
19
- Please make sure you have test coverage for anything you add or fix!
20
-
21
- Please add a CHANGELOG entry with any relevant tags for issues, pull-requests, and authors.
22
-
23
- Thanks!
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2011 Ryan Bates
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.