diff options
-rw-r--r-- | lib/chef_zero/chef_data/data_normalizer.rb | 12 | ||||
-rw-r--r-- | lib/chef_zero/version.rb | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/chef_zero/chef_data/data_normalizer.rb b/lib/chef_zero/chef_data/data_normalizer.rb index a762581..0df7fe5 100644 --- a/lib/chef_zero/chef_data/data_normalizer.rb +++ b/lib/chef_zero/chef_data/data_normalizer.rb @@ -8,8 +8,18 @@ module ChefZero def self.normalize_acls(acls) ChefData::DefaultCreator::PERMISSIONS.each do |perm| acls[perm] ||= {} - (acls[perm]["actors"] ||= []).uniq! # this gets doubled sometimes, for reasons. acls[perm]["groups"] ||= [] + if acls[perm].has_key? "users" + # When clients and users are split, their combined list + # is the final list of actors that a subsequent GET will + # provide. Each list is guaranteed to be unique, but the + # combined list is not. + acls[perm]["actors"] = acls[perm].delete("users").uniq + + acls[perm].delete("clients").uniq + else + # this gets doubled sometimes, for reasons. + (acls[perm]["actors"] ||= []).uniq! + end end acls end diff --git a/lib/chef_zero/version.rb b/lib/chef_zero/version.rb index 07bd466..f91c989 100644 --- a/lib/chef_zero/version.rb +++ b/lib/chef_zero/version.rb @@ -1,3 +1,3 @@ module ChefZero - VERSION = "4.9.0" + VERSION = "4.9.1" end |