diff options
author | John Keiser <john@johnkeiser.com> | 2016-01-27 13:04:01 -0800 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-01-27 13:04:01 -0800 |
commit | d515290f8e81dd4b4e54653524d610f419b9adf7 (patch) | |
tree | 52b567c3e968ee5a11289a3c07589df07405215e | |
parent | 81567887d3117f1bb1ed64b717eb0f628e149185 (diff) | |
download | chef-zero-d515290f8e81dd4b4e54653524d610f419b9adf7.tar.gz |
Treat policies and policy_groups as directories
-rw-r--r-- | lib/chef_zero/chef_data/default_creator.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef_zero/chef_data/default_creator.rb b/lib/chef_zero/chef_data/default_creator.rb index 38be6f3..0ad94d1 100644 --- a/lib/chef_zero/chef_data/default_creator.rb +++ b/lib/chef_zero/chef_data/default_creator.rb @@ -282,8 +282,7 @@ module ChefZero 'delete' => { 'groups' => %w(admins) }, 'grant' => { 'groups' => %w(admins) }, } - when 'containers/cookbook_artifacts', 'containers/cookbooks', - 'containers/environments', 'containers/policies', 'containers/policy_groups', 'containers/roles' + when 'containers/environments', 'containers/policies', 'containers/policy_groups', 'containers/roles' { 'create' => { 'groups' => %w(admins users) }, 'read' => { 'groups' => %w(admins users clients) }, @@ -291,7 +290,7 @@ module ChefZero 'delete' => { 'groups' => %w(admins users) }, 'grant' => { 'groups' => %w(admins) }, } - when 'containers/data' + when 'containers/cookbooks', 'containers/cookbook_artifacts', 'containers/data' { 'create' => { 'groups' => %w(admins users clients) }, 'read' => { 'groups' => %w(admins users clients) }, @@ -441,7 +440,7 @@ module ChefZero when 4 return path[0] == 'organizations' && ( (path[2] == 'acls' && path[1] != 'root') || - %w(cookbooks data).include?(path[2])) + %w(cookbooks cookbook_artifacts data policies policy_groups).include?(path[2])) else return false end |