summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Doherty <cdoherty@chef.io>2016-01-26 12:11:05 -0800
committerChris Doherty <cdoherty@chef.io>2016-01-26 12:11:57 -0800
commit225ce88e3e3fc327d39ad79da2c01ccbca37dc92 (patch)
tree42514ae057c7b688d7ac557654a9368fadf7fdf0
parent57f2536f25b06930dbbf3560dfc6e2b0c644af03 (diff)
downloadchef-zero-225ce88e3e3fc327d39ad79da2c01ccbca37dc92.tar.gz
DataNormalizer: Uniqify the list of actors, to satisfy pedant :acl specs (possibly the list shouldn't repeat to start with, but no one will ever know.
-rw-r--r--lib/chef_zero/chef_data/data_normalizer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef_zero/chef_data/data_normalizer.rb b/lib/chef_zero/chef_data/data_normalizer.rb
index 9a6d1ae..95f3daa 100644
--- a/lib/chef_zero/chef_data/data_normalizer.rb
+++ b/lib/chef_zero/chef_data/data_normalizer.rb
@@ -8,7 +8,7 @@ module ChefZero
def self.normalize_acls(acls)
ChefData::DefaultCreator::PERMISSIONS.each do |perm|
acls[perm] ||= {}
- acls[perm]['actors'] ||= []
+ (acls[perm]['actors'] ||= []).uniq! # this gets doubled sometimes, for reasons.
acls[perm]['groups'] ||= []
end
acls