diff options
author | Tim Smith <tsmith@chef.io> | 2019-12-29 18:06:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-29 18:06:37 -0800 |
commit | c8bf6efa66ff005ab87ff81c9a857ea0c6c1090e (patch) | |
tree | 3a25409c03ff3ac83f94e6e740145353d3e2c095 /lib/chef_zero/endpoints/acls_endpoint.rb | |
parent | 435755ee68c14fd6d6f858e451e7afeee1610e6f (diff) | |
parent | ecad8fee4a946b337e60a4274de2b2c872c9e81b (diff) | |
download | chef-zero-c8bf6efa66ff005ab87ff81c9a857ea0c6c1090e.tar.gz |
Merge pull request #298 from chef/chefstyle
Apply Chefstyle
Diffstat (limited to 'lib/chef_zero/endpoints/acls_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/acls_endpoint.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef_zero/endpoints/acls_endpoint.rb b/lib/chef_zero/endpoints/acls_endpoint.rb index 64840cd..48759c2 100644 --- a/lib/chef_zero/endpoints/acls_endpoint.rb +++ b/lib/chef_zero/endpoints/acls_endpoint.rb @@ -17,9 +17,10 @@ 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) - if !acl_path + unless 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) if request.query_params["detail"] == "granular" |