eco-helpers 2.0.58 → 2.0.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aec1ba6cc48e340c576f141bec3e128afcb0fe7e072051c8a6da5a6e0fb9c3b1
|
|
4
|
+
data.tar.gz: a592079366217bd0ec34fbae8a659ed971cc79bdac762a26f5f36e2346f0f944
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e612ff67ebd1148cffc40c064bdcb6e61d119c021b5b1261210699d1f1114bf5d42479822a54545f67947b6f0eee6293607a61947d5e245195cd7a60e1c5d56a
|
|
7
|
+
data.tar.gz: 2ff3fd08e0f4780a9f0891081357b1e3723ef341c8d038e2f3b3fa508b59349a21ea4bc30f7b71633cdabd73f8d7bd1032b189c67efd7c1316ae64b955d69e25
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
-
## [2.0.
|
|
4
|
+
## [2.0.59] - 2022-06-xx
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
- `Eco::API::Organization::TagTree#leafs` new method to spot tags with no children.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- `Eco::API::MicroCases#core_excluded`
|
|
11
|
+
- when person is `new?`, you should still be able to exclude `filter_tags`
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- `Eco::API::Policies::DefaultPolicies::UserAccess`
|
|
15
|
+
- `-exclude-account` should leave it untouched
|
|
16
|
+
|
|
17
|
+
## [2.0.58] - 2022-05-31
|
|
5
18
|
|
|
6
19
|
### Added
|
|
7
20
|
- **Usecase**`Eco::API::UseCases::DefaultCases::ClearAbilitiesTransCase`
|
|
@@ -12,7 +25,7 @@ All notable changes to this project will be documented in this file.
|
|
|
12
25
|
- `Eco::API::Common::Loaders::Base#abort` method to log an error and raise an exception
|
|
13
26
|
- **patched** `Ecoportal::API::Internal::Person`
|
|
14
27
|
- Added a couple of handy helpers: `#replace_doc` and `#replace_original_doc`
|
|
15
|
-
|
|
28
|
+
|
|
16
29
|
### Changed
|
|
17
30
|
- `Eco::API::Common::Session::SFTP#move` new parameter `override:` (default: `true`)
|
|
18
31
|
- If there was an error, it would delete the destination remote file and retry to move the file
|
|
@@ -7,12 +7,11 @@ module Eco
|
|
|
7
7
|
# @return [Array<String>] the core parameters that should not be included.
|
|
8
8
|
def core_excluded(person, options)
|
|
9
9
|
["supervisor_id"].tap do |core_excluded|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
end
|
|
14
|
-
core_excluded.concat(exclusions)
|
|
10
|
+
can_exclude = person.new?? ["filter_tags"] : ["name", "external_id", "email", "filter_tags"]
|
|
11
|
+
exclusions = can_exclude.select do |attr|
|
|
12
|
+
options.dig(:exclude, attr.to_sym)
|
|
15
13
|
end
|
|
14
|
+
core_excluded.concat(exclusions)
|
|
16
15
|
end
|
|
17
16
|
end
|
|
18
17
|
end
|
|
@@ -124,6 +124,14 @@ module Eco
|
|
|
124
124
|
subtags.include?(key&.upcase)
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
+
# Returns all the tags with no children
|
|
128
|
+
# @return [Array<String>]
|
|
129
|
+
def leafs
|
|
130
|
+
tags.select do |tag|
|
|
131
|
+
node(tag).children_count == 0
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
127
135
|
# Verifies if a tag exists in the tree.
|
|
128
136
|
# @param key [String] tag to verify.
|
|
129
137
|
# @return [Boolean]
|
|
@@ -16,6 +16,7 @@ class Eco::API::Policies::DefaultPolicies::UserAccess < Eco::API::Common::Loader
|
|
|
16
16
|
people.each do |person|
|
|
17
17
|
remove_account_when_no_email!(person) if person.email.to_s.empty?
|
|
18
18
|
next unless account = person.account
|
|
19
|
+
next if options.dig(:exclude, :account)
|
|
19
20
|
if account.policy_group_ids.empty? && def_pg
|
|
20
21
|
account.policy_group_ids = [def_pg]
|
|
21
22
|
end
|
data/lib/eco/version.rb
CHANGED