/usr/lib/ruby/vendor_ruby/chef_zero/endpoints/policy_revisions_endpoint.rb is in chef-zero 4.5.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require 'chef_zero/chef_data/data_normalizer'
module ChefZero
module Endpoints
# /organizations/ORG/policies/NAME/revisions
class PolicyRevisionsEndpoint < RestBase
# POST /organizations/ORG/policies/NAME/revisions
def post(request)
policyfile_data = parse_json(request.body)
create_data(request, request.rest_path, policyfile_data["revision_id"], request.body, :create_dir)
return already_json_response(201, request.body)
end
end
end
end
|