summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef_zero/chef_data/default_creator.rb10
-rw-r--r--lib/chef_zero/data_store/default_facade.rb2
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef_zero/chef_data/default_creator.rb b/lib/chef_zero/chef_data/default_creator.rb
index 0ad94d1..701daaa 100644
--- a/lib/chef_zero/chef_data/default_creator.rb
+++ b/lib/chef_zero/chef_data/default_creator.rb
@@ -282,7 +282,7 @@ module ChefZero
'delete' => { 'groups' => %w(admins) },
'grant' => { 'groups' => %w(admins) },
}
- when 'containers/environments', 'containers/policies', 'containers/policy_groups', 'containers/roles'
+ when 'containers/environments', 'containers/roles'
{
'create' => { 'groups' => %w(admins users) },
'read' => { 'groups' => %w(admins users clients) },
@@ -290,6 +290,14 @@ module ChefZero
'delete' => { 'groups' => %w(admins users) },
'grant' => { 'groups' => %w(admins) },
}
+ when 'containers/policy_groups', 'container/policies'
+ {
+ 'create' => { 'groups' => %w(admins) },
+ 'read' => { 'groups' => %w(admins) },
+ 'update' => { 'groups' => %w(admins) },
+ 'delete' => { 'groups' => %w(admins) },
+ 'grant' => { 'groups' => %w(admins users clients) },
+ }
when 'containers/cookbooks', 'containers/cookbook_artifacts', 'containers/data'
{
'create' => { 'groups' => %w(admins users clients) },
diff --git a/lib/chef_zero/data_store/default_facade.rb b/lib/chef_zero/data_store/default_facade.rb
index 0d4cf34..c941322 100644
--- a/lib/chef_zero/data_store/default_facade.rb
+++ b/lib/chef_zero/data_store/default_facade.rb
@@ -62,7 +62,7 @@ module ChefZero
end
options_hash = options.last.is_a?(Hash) ? options.last : {}
- default_creator.created(path + [ name ], options_hash[:requestor], options.include?(:recursive))
+ default_creator.created(path + [ name ], options_hash[:requestor], options.include?(:create_dir))
end
def get(path, request=nil)