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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4512b50521a216034448e918f086c8f26c83927dc6f6e8fb1d66f851d3b70c5
|
4
|
+
data.tar.gz: 760dffe785894549b92e1104c00a567c5752336f6f88a47ed09690d87f8b0fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|