summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNolan Davidson <ndavidson@chef.io>2017-10-27 14:00:30 -0400
committerNolan Davidson <ndavidson@chef.io>2017-10-27 14:00:30 -0400
commit73b12d28bb4c0b95e67420ec6b6a35f4fcd3bfdc (patch)
tree4b1dbe6410407b0954ae1c9e1a50a38f7365c3a1
parent6546f34e15dbbe0f59d512b13d23d08ba24381db (diff)
downloadchef-zero-SUSTAIN-728/cb-artifact-acl-endpoints.tar.gz
Fix default perms on cookbook_artifact objectsSUSTAIN-728/cb-artifact-acl-endpoints
The ACLs for `cookbook_artifact` objects currently do not include the creator of the object. Adding the `:create` option to the `set_data` call (which forwards it on to the `set` method on the data store), allows the `cookbook_artifact` object to have the creator added to its ACL. Signed-off-by: Nolan Davidson <ndavidson@chef.io>
-rw-r--r--lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb b/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb
index 4c70252..e586e94 100644
--- a/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb
+++ b/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb
@@ -20,7 +20,7 @@ module ChefZero
end
cb_data = normalize(request, request.body)
- set_data(request, nil, to_json(cb_data), :create_dir)
+ set_data(request, nil, to_json(cb_data), :create_dir, :create)
return already_json_response(201, request.body)
end