forest_admin_agent 1.0.0.pre.beta.57 → 1.0.0.pre.beta.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dca4529514a68e759c3cf45525ad7b685c27de0d75db47bec896d2f314c5964
4
- data.tar.gz: 610688be5b0dabfc8c37053913cf94d1c7e2d3949460d0a8d6563dfa841a5405
3
+ metadata.gz: ad27eb8ba35f3292c6216af7d415129b1ce822f6e1b759045efbccc11b89029f
4
+ data.tar.gz: 52fa9bacad9adafffa0d31398503191e94b7973c0138647cd0b1b78dc73218cd
5
5
  SHA512:
6
- metadata.gz: b08818d53e05288d8a1e81b6eb33b2d2c3ede89bd8ce51cc0a73481d3d7da3b6bb2b7292d2dfd63adcf1bab237b70ba9c7a8b6f53cc28117ce220cf466532b90
7
- data.tar.gz: 69780beab2f30e7ba1f9be093728cb7f77f61407d4d897d31f4dde45e5d110055af0c7f4d6335174f60a6046fc41593cad6e527ea56cd42580a816a1ec4d9c78
6
+ metadata.gz: 48849106eeef0a28e24ed80d0351893f9fe9210e0d0c3c38294efb37c1e019291097323dff64f37ab9d4e606d961c00843c929e72afd177715b644fad213974a
7
+ data.tar.gz: 8e4177bd4822369f2dcc28cf0ca12a1a04a0c6bb27b8d91f21d181c746aa267d2f89a4f4c1bbe31c6a6f4cb4b597fd34a6db64090c3633981555b9665b16e6ac
@@ -26,6 +26,10 @@ module ForestAdminAgent
26
26
  self
27
27
  end
28
28
 
29
+ def remove_collection(names)
30
+ @customizer.remove_collection(names)
31
+ end
32
+
29
33
  def add_chart(name, &definition)
30
34
  @customizer.add_chart(name, &definition)
31
35
 
@@ -9,6 +9,7 @@ module ForestAdminAgent
9
9
  api_charts_routes,
10
10
  System::HealthCheck.new.routes,
11
11
  Security::Authentication.new.routes,
12
+ Security::ScopeInvalidation.new.routes,
12
13
  Charts::Charts.new.routes,
13
14
  Resources::Count.new.routes,
14
15
  Resources::Delete.new.routes,
@@ -30,7 +31,7 @@ module ForestAdminAgent
30
31
  routes = {}
31
32
  Facades::Container.datasource.collections.each_value do |collection|
32
33
  collection.schema[:actions].each_key do |action_name|
33
- routes.merge!(Action::Action.new(collection, action_name).routes)
34
+ routes.merge!(Action::Actions.new(collection, action_name).routes)
34
35
  end
35
36
  end
36
37
 
@@ -5,7 +5,7 @@ require 'jwt'
5
5
  module ForestAdminAgent
6
6
  module Routes
7
7
  module Action
8
- class Action < AbstractAuthenticatedRoute
8
+ class Actions < AbstractAuthenticatedRoute
9
9
  include ForestAdminAgent::Builder
10
10
  include ForestAdminAgent::Utils
11
11
  include ForestAdminDatasourceToolkit::Components::Query
@@ -0,0 +1,28 @@
1
+ module ForestAdminAgent
2
+ module Routes
3
+ module Security
4
+ class ScopeInvalidation < AbstractRoute
5
+ include ForestAdminAgent::Builder
6
+ include ForestAdminAgent::Services
7
+ def setup_routes
8
+ add_route(
9
+ 'forest_scope_invalidation',
10
+ 'POST',
11
+ '/scope-cache-invalidation',
12
+ ->(args) { handle_request(args) }
13
+ )
14
+
15
+ self
16
+ end
17
+
18
+ def handle_request(args)
19
+ # Check if user is logged
20
+ Utils::QueryStringParser.parse_caller(args)
21
+ Permissions.invalidate_cache('forest.scopes')
22
+
23
+ { content: nil, status: 204 }
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -5,9 +5,9 @@ module ForestAdminAgent
5
5
  module Utils
6
6
  module Schema
7
7
  class SchemaEmitter
8
- LIANA_NAME = "forest-rails"
8
+ LIANA_NAME = "agent-ruby"
9
9
 
10
- LIANA_VERSION = "1.0.0-beta.57"
10
+ LIANA_VERSION = "1.0.0-beta.59"
11
11
 
12
12
  def self.get_serialized_schema(datasource)
13
13
  schema_path = Facades::Container.cache(:schema_path)
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.0.0-beta.57"
2
+ VERSION = "1.0.0-beta.59"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.57
4
+ version: 1.0.0.pre.beta.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-06-25 00:00:00.000000000 Z
12
+ date: 2024-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -244,7 +244,7 @@ files:
244
244
  - lib/forest_admin_agent/routes/abstract_authenticated_route.rb
245
245
  - lib/forest_admin_agent/routes/abstract_related_route.rb
246
246
  - lib/forest_admin_agent/routes/abstract_route.rb
247
- - lib/forest_admin_agent/routes/action/action.rb
247
+ - lib/forest_admin_agent/routes/action/actions.rb
248
248
  - lib/forest_admin_agent/routes/charts/api_chart_collection.rb
249
249
  - lib/forest_admin_agent/routes/charts/api_chart_datasource.rb
250
250
  - lib/forest_admin_agent/routes/charts/charts.rb
@@ -262,6 +262,7 @@ files:
262
262
  - lib/forest_admin_agent/routes/resources/store.rb
263
263
  - lib/forest_admin_agent/routes/resources/update.rb
264
264
  - lib/forest_admin_agent/routes/security/authentication.rb
265
+ - lib/forest_admin_agent/routes/security/scope_invalidation.rb
265
266
  - lib/forest_admin_agent/routes/system/health_check.rb
266
267
  - lib/forest_admin_agent/serializer/forest_chart_serializer.rb
267
268
  - lib/forest_admin_agent/serializer/forest_serializer.rb