forest_admin_agent 1.0.0.pre.beta.74 → 1.0.0.pre.beta.75

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: 9aee10c337bad1d302c476f26b2eed886e9cf9cb4986b76a1c294aa512fda2d6
4
- data.tar.gz: 276927c1894138999b709b329ca9fc0c00c05bec0312aae0d9f375734f84ce49
3
+ metadata.gz: b4512b50521a216034448e918f086c8f26c83927dc6f6e8fb1d66f851d3b70c5
4
+ data.tar.gz: 760dffe785894549b92e1104c00a567c5752336f6f88a47ed09690d87f8b0fb6
5
5
  SHA512:
6
- metadata.gz: 7de6d0f067b52944852326a2ffd25f457dbcdb89a7096fa95e7b03b5a3ceba689a3b87a58dcf9480824082c98b409b8b06c085d87132db002d9ec23db8e570e0
7
- data.tar.gz: 16f955505689adbaebc0c92762b287cc559ee099e1db6a325f553bbfed89faaee0b8b2f526b769fa96e892fb78e624172cb6928658197bac8b8e8fb1209cbd75
6
+ metadata.gz: aa879662b9a4b4c916458a27a9914439166c3b98314e2d9ba2327a83e876797ba4f1a89d06f22ae2c671924c3468a69f1ab50f76370ef1479a9a4d07c8df1365
7
+ data.tar.gz: 3c8911025c5f8b71f57053adafcfdcc8726800d624a2f9c40478aaf60596b03a146a46ae1f533523b6b79c09a0b6b2c7ebeea86f44756c8d0a346f0167911951
@@ -21,10 +21,16 @@ module ForestAdminAgent
21
21
 
22
22
  def handle_request(args = {})
23
23
  build(args)
24
- @permissions.can?(:delete, @collection)
25
24
 
26
25
  parent_id = Utils::Id.unpack_id(@collection, args[:params]['id'], with_key: true)
27
26
  is_delete_mode = !args.dig(:params, :delete).nil?
27
+
28
+ if is_delete_mode
29
+ @permissions.can?(:delete, @child_collection)
30
+ else
31
+ @permissions.can?(:edit, @collection)
32
+ end
33
+
28
34
  filter = get_base_foreign_filter(args)
29
35
  relation = Schema.get_to_many_relation(@collection, args[:params]['relation_name'])
30
36
 
@@ -7,7 +7,7 @@ module ForestAdminAgent
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
9
 
10
- LIANA_VERSION = "1.0.0-beta.74"
10
+ LIANA_VERSION = "1.0.0-beta.75"
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.74"
2
+ VERSION = "1.0.0-beta.75"
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.74
4
+ version: 1.0.0.pre.beta.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu