diff options
author | danielsdeleo <dan@getchef.com> | 2015-01-20 17:30:53 -0800 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2015-01-20 17:30:53 -0800 |
commit | 3840ba64b808a935451e450fe4691d96409d28f1 (patch) | |
tree | afb92affbfddee52294b7909cb335cdbb91257ea /lib/chef_zero/server.rb | |
parent | a81096de5d36afbacc6613378d6f837a34535678 (diff) | |
download | chef-zero-3840ba64b808a935451e450fe4691d96409d28f1.tar.gz |
Add policies endpoint
Diffstat (limited to 'lib/chef_zero/server.rb')
-rw-r--r-- | lib/chef_zero/server.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb index fb2b127..de2a3f5 100644 --- a/lib/chef_zero/server.rb +++ b/lib/chef_zero/server.rb @@ -69,6 +69,7 @@ require 'chef_zero/endpoints/organization_users_endpoint' require 'chef_zero/endpoints/organization_user_endpoint' require 'chef_zero/endpoints/organization_validator_key_endpoint' require 'chef_zero/endpoints/principal_endpoint' +require 'chef_zero/endpoints/policies_endpoint' require 'chef_zero/endpoints/role_endpoint' require 'chef_zero/endpoints/role_environments_endpoint' require 'chef_zero/endpoints/sandboxes_endpoint' @@ -358,7 +359,6 @@ module ChefZero # } # } def load_data(contents, org_name = nil) - passed_org = !!org_name org_name ||= options[:single_org] if org_name.nil? && contents.keys != [ 'users' ] raise "Must pass an org name to load_data or run in single_org mode" @@ -516,6 +516,7 @@ module ChefZero [ "/organizations/*/environments/*/roles/*", EnvironmentRoleEndpoint.new(self) ], [ "/organizations/*/nodes", RestListEndpoint.new(self) ], [ "/organizations/*/nodes/*", NodeEndpoint.new(self) ], + [ "/organizations/*/policies/*/*", PoliciesEndpoint.new(self) ], [ "/organizations/*/principals/*", PrincipalEndpoint.new(self) ], [ "/organizations/*/roles", RestListEndpoint.new(self) ], [ "/organizations/*/roles/*", RoleEndpoint.new(self) ], |