summaryrefslogtreecommitdiff
path: root/lib/chef_zero/chef_data/data_normalizer.rb
diff options
context:
space:
mode:
authorMarc Paradise <marc@chef.io>2016-08-26 17:33:10 -0400
committerMarc Paradise <marc@chef.io>2016-08-26 18:37:52 -0400
commit0fa7040ce0d59fc76cd2f31343a3d7b1d3b8569c (patch)
treec12db79358d00fe96002377b04b6bee5b2bf41f6 /lib/chef_zero/chef_data/data_normalizer.rb
parent19622a4459d3905a25a80ca842e46e62e6623373 (diff)
downloadchef-zero-mp/SPOOL-340.tar.gz
store ACEs by client/usermp/SPOOL-340
Chef Server has the ability to return users and clients separately within an GET ACL request when `detail=granular`. To support that, we need to store them separately and determine if we want to present `actors` or `users` and `clients` at the time of the request. This change makes a reasonable best effort at capturing the creator type (user v client) correctly and uses that for determining its assignment in acls.
Diffstat (limited to 'lib/chef_zero/chef_data/data_normalizer.rb')
-rw-r--r--lib/chef_zero/chef_data/data_normalizer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/chef_data/data_normalizer.rb b/lib/chef_zero/chef_data/data_normalizer.rb
index 0df7fe5..58b0d26 100644
--- a/lib/chef_zero/chef_data/data_normalizer.rb
+++ b/lib/chef_zero/chef_data/data_normalizer.rb
@@ -14,8 +14,8 @@ module ChefZero
# 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
+ acls[perm]["actors"] = acls[perm]["clients"].uniq +
+ acls[perm]["users"].uniq
else
# this gets doubled sometimes, for reasons.
(acls[perm]["actors"] ||= []).uniq!