summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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