summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalim Afiune <afiune@chef.io>2017-04-12 17:57:57 -0400
committerSalim Afiune <afiune@chef.io>2017-04-17 14:58:34 -0400
commitefed110f75b43b1b650f9b9c83da19dac2e98a26 (patch)
treee1319d637df58edcd2c573179de7e04e638205e3
parent684dfdbc8ea27cb166ad049eafda8561a3a94940 (diff)
downloadchef-zero-afiune/POOL-570/global-groups.tar.gz
Signed-off-by: Salim Afiune <afiune@chef.io>
-rw-r--r--lib/chef_zero/endpoints/acls_endpoint.rb3
-rw-r--r--lib/chef_zero/endpoints/cookbooks_base.rb1
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef_zero/endpoints/acls_endpoint.rb b/lib/chef_zero/endpoints/acls_endpoint.rb
index 64840cd..dfdd47f 100644
--- a/lib/chef_zero/endpoints/acls_endpoint.rb
+++ b/lib/chef_zero/endpoints/acls_endpoint.rb
@@ -17,11 +17,13 @@ module ChefZero
path = request.rest_path[0..-2] # Strip off _acl
path = path[0..1] if path.size == 3 && path[0] == "organizations" && %w{organization organizations}.include?(path[2])
acl_path = ChefData::AclPath.get_acl_data_path(path)
+ puts "ACL Path: #{acl_path}"
if !acl_path
raise RestErrorResponse.new(404, "Object not found: #{build_uri(request.base_uri, request.rest_path)}")
end
acls = FFI_Yajl::Parser.parse(get_data(request, acl_path))
acls = ChefData::DataNormalizer.normalize_acls(acls)
+ puts "ACL Data: #{acls}"
if request.query_params["detail"] == "granular"
acls.each do |perm, ace|
acls[perm]["actors"] = []
@@ -33,6 +35,7 @@ module ChefZero
end
end
+ puts "ACL Data2: #{acls}"
json_response(200, acls)
end
end
diff --git a/lib/chef_zero/endpoints/cookbooks_base.rb b/lib/chef_zero/endpoints/cookbooks_base.rb
index 28217fa..fe5698c 100644
--- a/lib/chef_zero/endpoints/cookbooks_base.rb
+++ b/lib/chef_zero/endpoints/cookbooks_base.rb
@@ -47,6 +47,7 @@ module ChefZero
end
def recipe_names(cookbook_name, cookbook)
+ puts cookbook
cookbook["recipes"].inject([]) do |acc, recipe|
if recipe["name"].eql?("default.rb")
acc << cookbook_name