forest_liana 5.3.1 → 5.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/forest_liana/actions_controller.rb +19 -3
  3. data/app/controllers/forest_liana/resources_controller.rb +14 -17
  4. data/app/controllers/forest_liana/smart_actions_controller.rb +10 -5
  5. data/app/serializers/forest_liana/stripe_invoice_serializer.rb +5 -5
  6. data/app/services/forest_liana/permissions_checker.rb +118 -56
  7. data/app/services/forest_liana/permissions_formatter.rb +52 -0
  8. data/app/services/forest_liana/permissions_getter.rb +52 -17
  9. data/app/services/forest_liana/scope_validator.rb +8 -7
  10. data/app/services/forest_liana/stripe_invoice_getter.rb +1 -1
  11. data/app/services/forest_liana/stripe_invoices_getter.rb +1 -1
  12. data/app/services/forest_liana/stripe_source_getter.rb +1 -1
  13. data/app/services/forest_liana/stripe_sources_getter.rb +1 -1
  14. data/app/services/forest_liana/utils/beta_schema_utils.rb +13 -0
  15. data/lib/forest_liana/bootstrapper.rb +5 -5
  16. data/lib/forest_liana/version.rb +1 -1
  17. data/spec/dummy/app/assets/config/manifest.js +1 -0
  18. data/spec/dummy/config/application.rb +1 -1
  19. data/spec/dummy/db/migrate/20190226172951_create_user.rb +1 -1
  20. data/spec/dummy/db/migrate/20190226173051_create_isle.rb +1 -1
  21. data/spec/dummy/db/migrate/20190226174951_create_tree.rb +1 -1
  22. data/spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb +1 -1
  23. data/spec/dummy/db/migrate/20190716135241_add_type_to_user.rb +1 -1
  24. data/spec/dummy/db/schema.rb +18 -20
  25. data/spec/requests/actions_controller_spec.rb +95 -12
  26. data/spec/requests/resources_spec.rb +4 -4
  27. data/spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb +711 -0
  28. data/spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb +831 -0
  29. data/spec/services/forest_liana/permissions_formatter_spec.rb +222 -0
  30. data/spec/services/forest_liana/permissions_getter_spec.rb +82 -0
  31. data/spec/spec_helper.rb +3 -0
  32. data/test/dummy/app/assets/config/manifest.js +1 -0
  33. data/test/dummy/config/application.rb +1 -1
  34. data/test/dummy/db/migrate/20150608130516_create_date_field.rb +1 -1
  35. data/test/dummy/db/migrate/20150608131430_create_integer_field.rb +1 -1
  36. data/test/dummy/db/migrate/20150608131603_create_decimal_field.rb +1 -1
  37. data/test/dummy/db/migrate/20150608131610_create_float_field.rb +1 -1
  38. data/test/dummy/db/migrate/20150608132159_create_boolean_field.rb +1 -1
  39. data/test/dummy/db/migrate/20150608132621_create_string_field.rb +1 -1
  40. data/test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb +1 -1
  41. data/test/dummy/db/migrate/20150608133044_create_has_one_field.rb +1 -1
  42. data/test/dummy/db/migrate/20150608150016_create_has_many_field.rb +1 -1
  43. data/test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb +1 -1
  44. data/test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb +1 -1
  45. data/test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb +1 -1
  46. data/test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb +1 -1
  47. data/test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb +1 -1
  48. data/test/dummy/db/migrate/20160627172810_create_owner.rb +1 -1
  49. data/test/dummy/db/migrate/20160627172951_create_tree.rb +1 -1
  50. data/test/dummy/db/migrate/20160628173505_add_timestamps.rb +1 -1
  51. data/test/dummy/db/migrate/20170614141921_create_serialize_field.rb +1 -1
  52. data/test/dummy/db/migrate/20181111162121_create_references_table.rb +1 -1
  53. data/test/services/forest_liana/resources_getter_test.rb +1 -1
  54. metadata +16 -2
@@ -1,4 +1,4 @@
1
- class CreateReferencesTable < ActiveRecord::Migration
1
+ class CreateReferencesTable < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :references do |t|
4
4
  end
@@ -106,7 +106,7 @@ module ForestLiana
106
106
  conditions: [{
107
107
  field: 'created_at',
108
108
  operator: 'after',
109
- value: '2015-06-18 08:00:00',
109
+ value: "#{Time.now.year - 5}-06-18 08:00:00",
110
110
  }, {
111
111
  field: 'owner:name',
112
112
  operator: 'equal',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.1
4
+ version: 5.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-07 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -255,6 +255,7 @@ files:
255
255
  - app/services/forest_liana/objective_stat_getter.rb
256
256
  - app/services/forest_liana/operator_date_interval_parser.rb
257
257
  - app/services/forest_liana/permissions_checker.rb
258
+ - app/services/forest_liana/permissions_formatter.rb
258
259
  - app/services/forest_liana/permissions_getter.rb
259
260
  - app/services/forest_liana/pie_stat_getter.rb
260
261
  - app/services/forest_liana/query_stat_getter.rb
@@ -279,6 +280,7 @@ files:
279
280
  - app/services/forest_liana/stripe_subscriptions_getter.rb
280
281
  - app/services/forest_liana/two_factor_registration_confirmer.rb
281
282
  - app/services/forest_liana/user_secret_creator.rb
283
+ - app/services/forest_liana/utils/beta_schema_utils.rb
282
284
  - app/services/forest_liana/value_stat_getter.rb
283
285
  - app/views/layouts/forest_liana/application.html.erb
284
286
  - config/initializers/arel-helpers.rb
@@ -300,6 +302,7 @@ files:
300
302
  - lib/tasks/send_apimap.rake
301
303
  - spec/dummy/README.rdoc
302
304
  - spec/dummy/Rakefile
305
+ - spec/dummy/app/assets/config/manifest.js
303
306
  - spec/dummy/app/assets/javascripts/application.js
304
307
  - spec/dummy/app/assets/stylesheets/application.css
305
308
  - spec/dummy/app/config/routes.rb
@@ -347,10 +350,15 @@ files:
347
350
  - spec/services/forest_liana/apimap_sorter_spec.rb
348
351
  - spec/services/forest_liana/filters_parser_spec.rb
349
352
  - spec/services/forest_liana/ip_whitelist_checker_spec.rb
353
+ - spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
354
+ - spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
355
+ - spec/services/forest_liana/permissions_formatter_spec.rb
356
+ - spec/services/forest_liana/permissions_getter_spec.rb
350
357
  - spec/services/forest_liana/schema_adapter_spec.rb
351
358
  - spec/spec_helper.rb
352
359
  - test/dummy/README.rdoc
353
360
  - test/dummy/Rakefile
361
+ - test/dummy/app/assets/config/manifest.js
354
362
  - test/dummy/app/assets/javascripts/application.js
355
363
  - test/dummy/app/assets/stylesheets/application.css
356
364
  - test/dummy/app/controllers/application_controller.rb
@@ -504,6 +512,7 @@ test_files:
504
512
  - test/dummy/app/helpers/application_helper.rb
505
513
  - test/dummy/app/assets/javascripts/application.js
506
514
  - test/dummy/app/assets/stylesheets/application.css
515
+ - test/dummy/app/assets/config/manifest.js
507
516
  - test/dummy/app/controllers/application_controller.rb
508
517
  - test/dummy/Rakefile
509
518
  - test/dummy/bin/rake
@@ -555,10 +564,14 @@ test_files:
555
564
  - test/dummy/config/database.yml
556
565
  - test/forest_liana_test.rb
557
566
  - test/routing/route_test.rb
567
+ - spec/services/forest_liana/permissions_formatter_spec.rb
568
+ - spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
558
569
  - spec/services/forest_liana/ip_whitelist_checker_spec.rb
570
+ - spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
559
571
  - spec/services/forest_liana/schema_adapter_spec.rb
560
572
  - spec/services/forest_liana/apimap_sorter_spec.rb
561
573
  - spec/services/forest_liana/filters_parser_spec.rb
574
+ - spec/services/forest_liana/permissions_getter_spec.rb
562
575
  - spec/spec_helper.rb
563
576
  - spec/requests/actions_controller_spec.rb
564
577
  - spec/requests/resources_spec.rb
@@ -570,6 +583,7 @@ test_files:
570
583
  - spec/dummy/app/helpers/application_helper.rb
571
584
  - spec/dummy/app/assets/javascripts/application.js
572
585
  - spec/dummy/app/assets/stylesheets/application.css
586
+ - spec/dummy/app/assets/config/manifest.js
573
587
  - spec/dummy/app/config/routes.rb
574
588
  - spec/dummy/app/controllers/application_controller.rb
575
589
  - spec/dummy/Rakefile