From 73b12d28bb4c0b95e67420ec6b6a35f4fcd3bfdc Mon Sep 17 00:00:00 2001 From: Nolan Davidson Date: Fri, 27 Oct 2017 14:00:30 -0400 Subject: Fix default perms on cookbook_artifact objects 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 --- lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1