forest_liana 6.2.0 → 6.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9848129f2f5c8fa6a8f473898b97b291141ac75b166ffb048e37bf0beee7710
4
- data.tar.gz: 9541c943609b5c7ae327681fef57595c1efcc4566130b0a84ca4ef18a988279f
3
+ metadata.gz: a28bd829a3004c62b0c2accffd12b9c089913e944c66f262c247fe9f529c898c
4
+ data.tar.gz: d884e158839f6c8418da92751a36fa0b4db642e8c3a7fce5b6c76dce966afe24
5
5
  SHA512:
6
- metadata.gz: 59b7edfc50fd69d01ee77128ce697093d323bff74c1bec07cf92c7337029aead57eadf0ff72a19d825e41cb915fbf116380d04339e34b59fc31b59457d698e98
7
- data.tar.gz: 061a4c5cd8bbe61bcb6968a7fbd538dbd0e4cb2f88be7181888d222a5d15443f8e593a1d360cf19ebca11e95f349f5b51c4628bda998ed16aa6e43350a873ce8
6
+ metadata.gz: 0f2dd4cd85cd8040430a69a4459a98cb8f0a57a9e9177a82e6efc85e0716db7f837c9f7110f2e20ad4cfe76ac587257926cf94e932713d8e6d72670fb1d59faa
7
+ data.tar.gz: a99fce237e2a743237404aa613e1ae1eb65822427d2410c52bf81ebdd6470025e310e73e38b12bbc82357cfb074fef1091afb3a6e8be51596eeaabe12f7cda12
@@ -48,6 +48,7 @@ class ForestLiana::Model::Action
48
48
  field[:default_value] = nil unless field.key?(:default_value)
49
49
  field[:enums] = nil unless field.key?(:enums)
50
50
  field[:is_required] = false unless field.key?(:is_required)
51
+ field[:is_read_only] = false unless field.key?(:is_read_only)
51
52
  field[:reference] = nil unless field.key?(:reference)
52
53
  field[:description] = nil unless field.key?(:description)
53
54
  field[:widget] = nil unless field.key?(:widget)
@@ -47,6 +47,7 @@ module ForestLiana
47
47
  'default_value',
48
48
  'enums',
49
49
  'is_required',
50
+ 'is_read_only',
50
51
  'reference',
51
52
  'description',
52
53
  'position',
@@ -4,22 +4,20 @@ module ForestLiana
4
4
  class OidcClientManager
5
5
  def self.get_client_for_callback_url(callback_url)
6
6
  begin
7
- client_data = Rails.cache.read(callback_url) || nil
8
- if client_data.nil?
9
- configuration = ForestLiana::OidcConfigurationRetriever.retrieve()
10
-
11
- if ForestLiana.forest_client_id.nil?
7
+ configuration = ForestLiana::OidcConfigurationRetriever.retrieve()
8
+ if ForestLiana.forest_client_id.nil?
9
+ client_data = Rails.cache.read("#{callback_url}-#{ForestLiana.env_secret}-client-data") || nil
10
+ if client_data.nil?
12
11
  client_credentials = ForestLiana::OidcDynamicClientRegistrator.register({
13
12
  token_endpoint_auth_method: 'none',
14
13
  redirect_uris: [callback_url],
15
14
  registration_endpoint: configuration['registration_endpoint']
16
15
  })
17
- else
18
- client_credentials = { 'client_id' => ForestLiana.forest_client_id }
16
+ client_data = { :client_id => client_credentials['client_id'], :issuer => configuration['issuer'] }
17
+ Rails.cache.write("#{callback_url}-#{ForestLiana.env_secret}-client-data", client_data)
19
18
  end
20
-
21
- client_data = { :client_id => client_credentials['client_id'], :issuer => configuration['issuer'] }
22
- Rails.cache.write(callback_url, client_data)
19
+ else
20
+ client_data = { :client_id => ForestLiana.forest_client_id, :issuer => configuration['issuer'] }
23
21
  end
24
22
 
25
23
  OpenIDConnect::Client.new(
@@ -30,7 +28,7 @@ module ForestLiana
30
28
  token_endpoint: '/oidc/token',
31
29
  )
32
30
  rescue => error
33
- Rails.cache.delete(callback_url)
31
+ Rails.cache.delete("#{callback_url}-#{ForestLiana.env_secret}-client-data")
34
32
  raise error
35
33
  end
36
34
  end
@@ -58,6 +58,7 @@ module ForestLiana
58
58
  'default_value',
59
59
  'enums',
60
60
  'is_required',
61
+ 'is_read_only',
61
62
  'reference',
62
63
  'description',
63
64
  'position',
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "6.2.0"
2
+ VERSION = "6.3.1"
3
3
  end
@@ -26,6 +26,7 @@ describe 'Requesting Actions routes', :type => :request do
26
26
  default_value: nil,
27
27
  enums: nil,
28
28
  is_required: false,
29
+ is_read_only: false,
29
30
  reference: nil,
30
31
  description: nil,
31
32
  widget: nil,
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: 6.2.0
4
+ version: 6.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2021-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -497,160 +497,160 @@ signing_key:
497
497
  specification_version: 4
498
498
  summary: Official Rails Liana for Forest
499
499
  test_files:
500
- - test/dummy/config.ru
501
- - test/dummy/README.rdoc
502
- - test/dummy/config/database.yml
503
- - test/dummy/config/routes.rb
504
- - test/dummy/config/environments/test.rb
505
- - test/dummy/config/environments/development.rb
506
- - test/dummy/config/environments/production.rb
507
- - test/dummy/config/initializers/assets.rb
508
- - test/dummy/config/initializers/cookies_serializer.rb
509
- - test/dummy/config/initializers/mime_types.rb
510
- - test/dummy/config/initializers/filter_parameter_logging.rb
511
- - test/dummy/config/initializers/inflections.rb
512
- - test/dummy/config/initializers/wrap_parameters.rb
513
- - test/dummy/config/initializers/backtrace_silencers.rb
514
- - test/dummy/config/initializers/session_store.rb
515
- - test/dummy/config/secrets.yml
516
- - test/dummy/config/environment.rb
517
- - test/dummy/config/application.rb
518
- - test/dummy/config/boot.rb
519
- - test/dummy/config/locales/en.yml
520
- - test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
500
+ - test/dummy/db/migrate/20150608133044_create_has_one_field.rb
501
+ - test/dummy/db/migrate/20150608132159_create_boolean_field.rb
521
502
  - test/dummy/db/migrate/20160627172810_create_owner.rb
522
- - test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb
523
- - test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
524
- - test/dummy/db/migrate/20150608131430_create_integer_field.rb
525
- - test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
526
- - test/dummy/db/migrate/20170614141921_create_serialize_field.rb
527
- - test/dummy/db/migrate/20150608130516_create_date_field.rb
528
- - test/dummy/db/migrate/20160628173505_add_timestamps.rb
529
503
  - test/dummy/db/migrate/20150608131603_create_decimal_field.rb
504
+ - test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
505
+ - test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
530
506
  - test/dummy/db/migrate/20160627172951_create_tree.rb
531
- - test/dummy/db/migrate/20181111162121_create_references_table.rb
532
507
  - test/dummy/db/migrate/20150608131610_create_float_field.rb
533
- - test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
534
- - test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
535
- - test/dummy/db/migrate/20150608132159_create_boolean_field.rb
536
508
  - test/dummy/db/migrate/20150608150016_create_has_many_field.rb
537
- - test/dummy/db/migrate/20150608133044_create_has_one_field.rb
509
+ - test/dummy/db/migrate/20150608131430_create_integer_field.rb
510
+ - test/dummy/db/migrate/20181111162121_create_references_table.rb
511
+ - test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
538
512
  - test/dummy/db/migrate/20150608132621_create_string_field.rb
513
+ - test/dummy/db/migrate/20170614141921_create_serialize_field.rb
514
+ - test/dummy/db/migrate/20150608130516_create_date_field.rb
515
+ - test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb
516
+ - test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
517
+ - test/dummy/db/migrate/20160628173505_add_timestamps.rb
518
+ - test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
539
519
  - test/dummy/db/schema.rb
540
- - test/dummy/app/views/layouts/application.html.erb
541
- - test/dummy/app/assets/config/manifest.js
542
- - test/dummy/app/assets/stylesheets/application.css
543
- - test/dummy/app/assets/javascripts/application.js
544
- - test/dummy/app/helpers/application_helper.rb
520
+ - test/dummy/public/404.html
521
+ - test/dummy/public/500.html
522
+ - test/dummy/public/422.html
523
+ - test/dummy/public/favicon.ico
524
+ - test/dummy/Rakefile
545
525
  - test/dummy/app/controllers/application_controller.rb
546
- - test/dummy/app/models/belongs_to_class_name_field.rb
547
- - test/dummy/app/models/string_field.rb
526
+ - test/dummy/app/models/has_and_belongs_to_many_field.rb
527
+ - test/dummy/app/models/polymorphic_field.rb
528
+ - test/dummy/app/models/has_many_field.rb
548
529
  - test/dummy/app/models/float_field.rb
549
- - test/dummy/app/models/reference.rb
530
+ - test/dummy/app/models/string_field.rb
550
531
  - test/dummy/app/models/has_one_field.rb
551
- - test/dummy/app/models/integer_field.rb
552
- - test/dummy/app/models/boolean_field.rb
553
- - test/dummy/app/models/belongs_to_field.rb
554
- - test/dummy/app/models/date_field.rb
555
- - test/dummy/app/models/has_many_field.rb
532
+ - test/dummy/app/models/reference.rb
556
533
  - test/dummy/app/models/serialize_field.rb
557
- - test/dummy/app/models/has_and_belongs_to_many_field.rb
558
- - test/dummy/app/models/decimal_field.rb
534
+ - test/dummy/app/models/boolean_field.rb
559
535
  - test/dummy/app/models/has_many_through_field.rb
536
+ - test/dummy/app/models/belongs_to_class_name_field.rb
537
+ - test/dummy/app/models/decimal_field.rb
538
+ - test/dummy/app/models/integer_field.rb
560
539
  - test/dummy/app/models/tree.rb
561
- - test/dummy/app/models/owner.rb
562
- - test/dummy/app/models/polymorphic_field.rb
540
+ - test/dummy/app/models/date_field.rb
541
+ - test/dummy/app/models/belongs_to_field.rb
563
542
  - test/dummy/app/models/has_many_class_name_field.rb
564
- - test/dummy/Rakefile
565
- - test/dummy/public/404.html
566
- - test/dummy/public/422.html
567
- - test/dummy/public/500.html
568
- - test/dummy/public/favicon.ico
569
- - test/dummy/bin/setup
543
+ - test/dummy/app/models/owner.rb
544
+ - test/dummy/app/assets/stylesheets/application.css
545
+ - test/dummy/app/assets/javascripts/application.js
546
+ - test/dummy/app/assets/config/manifest.js
547
+ - test/dummy/app/helpers/application_helper.rb
548
+ - test/dummy/app/views/layouts/application.html.erb
549
+ - test/dummy/README.rdoc
550
+ - test/dummy/config.ru
551
+ - test/dummy/config/environment.rb
552
+ - test/dummy/config/secrets.yml
553
+ - test/dummy/config/boot.rb
554
+ - test/dummy/config/database.yml
555
+ - test/dummy/config/routes.rb
556
+ - test/dummy/config/application.rb
557
+ - test/dummy/config/initializers/filter_parameter_logging.rb
558
+ - test/dummy/config/initializers/mime_types.rb
559
+ - test/dummy/config/initializers/session_store.rb
560
+ - test/dummy/config/initializers/inflections.rb
561
+ - test/dummy/config/initializers/assets.rb
562
+ - test/dummy/config/initializers/wrap_parameters.rb
563
+ - test/dummy/config/initializers/backtrace_silencers.rb
564
+ - test/dummy/config/initializers/cookies_serializer.rb
565
+ - test/dummy/config/environments/test.rb
566
+ - test/dummy/config/environments/production.rb
567
+ - test/dummy/config/environments/development.rb
568
+ - test/dummy/config/locales/en.yml
569
+ - test/dummy/bin/rake
570
570
  - test/dummy/bin/bundle
571
571
  - test/dummy/bin/rails
572
- - test/dummy/bin/rake
573
- - test/fixtures/serialize_field.yml
574
- - test/fixtures/string_field.yml
572
+ - test/dummy/bin/setup
573
+ - test/test_helper.rb
574
+ - test/forest_liana_test.rb
575
+ - test/services/forest_liana/has_many_getter_test.rb
576
+ - test/services/forest_liana/resource_updater_test.rb
577
+ - test/services/forest_liana/schema_adapter_test.rb
578
+ - test/services/forest_liana/scope_validator_test.rb
579
+ - test/services/forest_liana/value_stat_getter_test.rb
580
+ - test/services/forest_liana/pie_stat_getter_test.rb
581
+ - test/fixtures/owner.yml
582
+ - test/fixtures/has_many_through_field.yml
583
+ - test/fixtures/reference.yml
575
584
  - test/fixtures/has_many_field.yml
585
+ - test/fixtures/has_one_field.yml
576
586
  - test/fixtures/belongs_to_field.yml
577
- - test/fixtures/reference.yml
578
- - test/fixtures/has_many_through_field.yml
579
- - test/fixtures/owner.yml
587
+ - test/fixtures/string_field.yml
588
+ - test/fixtures/serialize_field.yml
580
589
  - test/fixtures/tree.yml
581
- - test/fixtures/has_one_field.yml
582
590
  - test/routing/route_test.rb
583
- - test/forest_liana_test.rb
584
- - test/test_helper.rb
585
- - test/services/forest_liana/value_stat_getter_test.rb
586
- - test/services/forest_liana/resource_updater_test.rb
587
- - test/services/forest_liana/pie_stat_getter_test.rb
588
- - test/services/forest_liana/has_many_getter_test.rb
589
- - test/services/forest_liana/scope_validator_test.rb
590
- - test/services/forest_liana/schema_adapter_test.rb
591
- - spec/dummy/config.ru
592
- - spec/dummy/README.rdoc
593
- - spec/dummy/config/database.yml
594
- - spec/dummy/config/routes.rb
595
- - spec/dummy/config/environments/test.rb
596
- - spec/dummy/config/environments/development.rb
597
- - spec/dummy/config/environments/production.rb
598
- - spec/dummy/config/initializers/forest_liana.rb
599
- - spec/dummy/config/initializers/assets.rb
600
- - spec/dummy/config/initializers/cookies_serializer.rb
601
- - spec/dummy/config/initializers/mime_types.rb
602
- - spec/dummy/config/initializers/filter_parameter_logging.rb
603
- - spec/dummy/config/initializers/inflections.rb
604
- - spec/dummy/config/initializers/wrap_parameters.rb
605
- - spec/dummy/config/initializers/backtrace_silencers.rb
606
- - spec/dummy/config/initializers/session_store.rb
607
- - spec/dummy/config/secrets.yml
608
- - spec/dummy/config/environment.rb
609
- - spec/dummy/config/application.rb
610
- - spec/dummy/config/boot.rb
611
- - spec/dummy/db/migrate/20210326140855_create_locations.rb
612
- - spec/dummy/db/migrate/20190226173051_create_isle.rb
613
- - spec/dummy/db/migrate/20190226172951_create_user.rb
614
- - spec/dummy/db/migrate/20190226174951_create_tree.rb
615
591
  - spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
616
592
  - spec/dummy/db/migrate/20210326110524_create_references.rb
593
+ - spec/dummy/db/migrate/20190226173051_create_isle.rb
594
+ - spec/dummy/db/migrate/20190226174951_create_tree.rb
617
595
  - spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb
596
+ - spec/dummy/db/migrate/20190226172951_create_user.rb
597
+ - spec/dummy/db/migrate/20210326140855_create_locations.rb
618
598
  - spec/dummy/db/schema.rb
619
599
  - spec/dummy/lib/forest_liana/collections/location.rb
620
600
  - spec/dummy/lib/forest_liana/collections/user.rb
621
- - spec/dummy/app/views/layouts/application.html.erb
622
- - spec/dummy/app/config/routes.rb
623
- - spec/dummy/app/assets/config/manifest.js
624
- - spec/dummy/app/assets/stylesheets/application.css
625
- - spec/dummy/app/assets/javascripts/application.js
626
- - spec/dummy/app/helpers/application_helper.rb
601
+ - spec/dummy/Rakefile
627
602
  - spec/dummy/app/controllers/application_controller.rb
628
- - spec/dummy/app/models/location.rb
629
- - spec/dummy/app/models/reference.rb
630
603
  - spec/dummy/app/models/island.rb
631
- - spec/dummy/app/models/user.rb
604
+ - spec/dummy/app/models/reference.rb
605
+ - spec/dummy/app/models/location.rb
632
606
  - spec/dummy/app/models/tree.rb
633
- - spec/dummy/Rakefile
634
- - spec/dummy/bin/setup
607
+ - spec/dummy/app/models/user.rb
608
+ - spec/dummy/app/assets/stylesheets/application.css
609
+ - spec/dummy/app/assets/javascripts/application.js
610
+ - spec/dummy/app/assets/config/manifest.js
611
+ - spec/dummy/app/config/routes.rb
612
+ - spec/dummy/app/helpers/application_helper.rb
613
+ - spec/dummy/app/views/layouts/application.html.erb
614
+ - spec/dummy/README.rdoc
615
+ - spec/dummy/config.ru
616
+ - spec/dummy/config/environment.rb
617
+ - spec/dummy/config/secrets.yml
618
+ - spec/dummy/config/boot.rb
619
+ - spec/dummy/config/database.yml
620
+ - spec/dummy/config/routes.rb
621
+ - spec/dummy/config/application.rb
622
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
623
+ - spec/dummy/config/initializers/forest_liana.rb
624
+ - spec/dummy/config/initializers/mime_types.rb
625
+ - spec/dummy/config/initializers/session_store.rb
626
+ - spec/dummy/config/initializers/inflections.rb
627
+ - spec/dummy/config/initializers/assets.rb
628
+ - spec/dummy/config/initializers/wrap_parameters.rb
629
+ - spec/dummy/config/initializers/backtrace_silencers.rb
630
+ - spec/dummy/config/initializers/cookies_serializer.rb
631
+ - spec/dummy/config/environments/test.rb
632
+ - spec/dummy/config/environments/production.rb
633
+ - spec/dummy/config/environments/development.rb
634
+ - spec/dummy/bin/rake
635
635
  - spec/dummy/bin/bundle
636
636
  - spec/dummy/bin/rails
637
- - spec/dummy/bin/rake
638
- - spec/helpers/forest_liana/is_same_data_structure_helper_spec.rb
639
- - spec/helpers/forest_liana/query_helper_spec.rb
640
- - spec/helpers/forest_liana/schema_helper_spec.rb
641
- - spec/spec_helper.rb
642
- - spec/requests/authentications_spec.rb
643
- - spec/requests/resources_spec.rb
644
- - spec/requests/stats_spec.rb
645
- - spec/requests/actions_controller_spec.rb
646
- - spec/rails_helper.rb
647
- - spec/services/forest_liana/schema_adapter_spec.rb
648
- - spec/services/forest_liana/ip_whitelist_checker_spec.rb
637
+ - spec/dummy/bin/setup
638
+ - spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
649
639
  - spec/services/forest_liana/resources_getter_spec.rb
640
+ - spec/services/forest_liana/permissions_formatter_spec.rb
650
641
  - spec/services/forest_liana/permissions_checker_live_queries_spec.rb
642
+ - spec/services/forest_liana/permissions_getter_spec.rb
643
+ - spec/services/forest_liana/schema_adapter_spec.rb
651
644
  - spec/services/forest_liana/apimap_sorter_spec.rb
652
- - spec/services/forest_liana/permissions_formatter_spec.rb
653
- - spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
654
645
  - spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
646
+ - spec/services/forest_liana/ip_whitelist_checker_spec.rb
655
647
  - spec/services/forest_liana/filters_parser_spec.rb
656
- - spec/services/forest_liana/permissions_getter_spec.rb
648
+ - spec/rails_helper.rb
649
+ - spec/requests/resources_spec.rb
650
+ - spec/requests/authentications_spec.rb
651
+ - spec/requests/actions_controller_spec.rb
652
+ - spec/requests/stats_spec.rb
653
+ - spec/helpers/forest_liana/is_same_data_structure_helper_spec.rb
654
+ - spec/helpers/forest_liana/schema_helper_spec.rb
655
+ - spec/helpers/forest_liana/query_helper_spec.rb
656
+ - spec/spec_helper.rb