forest_admin_agent 1.0.0.pre.beta.76 → 1.0.0.pre.beta.77
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: acb44dc3e46d11e1cf6ff2cc910f8c337bf499df84a12e508f641af9b6a07188
|
4
|
+
data.tar.gz: 65f2a20cebb62e62b9ed67de3ef692b71765eaf61b46eb0ff603606577efde9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5086df998e3f22f9d04772f29375c33f13469aa98849045a6db9c96d1569286258f7c97fb75bb24a0d4a3dfbe61c7193d17932c625e66ee323541a37d9f676db
|
7
|
+
data.tar.gz: 957247e377111b6b48c5e69fdf375bbf7c3890043a254a16af7cfe2a5ce366d7011222dffd60438413cd3c59444399a5d8eec0371787112370773d4a0f5e94c9
|
@@ -5,6 +5,7 @@ module ForestAdminAgent
|
|
5
5
|
module Resources
|
6
6
|
class List < AbstractAuthenticatedRoute
|
7
7
|
include ForestAdminDatasourceToolkit::Components::Query::ConditionTree
|
8
|
+
include ForestAdminDatasourceToolkit::Validations
|
8
9
|
|
9
10
|
def setup_routes
|
10
11
|
add_route('forest_list', 'get', '/:collection_name', ->(args) { handle_request(args) })
|
@@ -30,6 +31,8 @@ module ForestAdminAgent
|
|
30
31
|
segment: ForestAdminAgent::Utils::QueryStringParser.parse_segment(@collection, args)
|
31
32
|
)
|
32
33
|
|
34
|
+
ConditionTreeValidator.validate(filter.condition_tree, @collection) if filter.condition_tree
|
35
|
+
|
33
36
|
projection = ForestAdminAgent::Utils::QueryStringParser.parse_projection_with_pks(@collection, args)
|
34
37
|
records = @collection.list(@caller, filter, projection)
|
35
38
|
|
@@ -29,9 +29,9 @@ module ForestAdminAgent
|
|
29
29
|
end
|
30
30
|
|
31
31
|
if context_variable_key.start_with?(USER_VALUE_TAG_PREFIX)
|
32
|
+
tag_key = context_variable_key[USER_VALUE_TAG_PREFIX.length..]
|
32
33
|
user[:tags].each do |tag|
|
33
|
-
|
34
|
-
return tag[match_key] if tag.key?(match_key)
|
34
|
+
return tag['value'] if tag['key'] == tag_key
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|