summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/acl_endpoint.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-07-24 08:00:19 -0600
committerJohn Keiser <jkeiser@opscode.com>2014-08-22 09:20:48 -0700
commitc5d40545370510f764b834ba3096d2bd4eb301e5 (patch)
tree1ba1f2d14a213540a9ea8a48ef53f1aac0068aee /lib/chef_zero/endpoints/acl_endpoint.rb
parentf14e184bb5fa4de5bea75b10a0d525a5fde6b474 (diff)
downloadchef-zero-c5d40545370510f764b834ba3096d2bd4eb301e5.tar.gz
/organizations/ORG/organization/_acl/create should 404
Diffstat (limited to 'lib/chef_zero/endpoints/acl_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/acl_endpoint.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef_zero/endpoints/acl_endpoint.rb b/lib/chef_zero/endpoints/acl_endpoint.rb
index 3458bfc..072e8cb 100644
--- a/lib/chef_zero/endpoints/acl_endpoint.rb
+++ b/lib/chef_zero/endpoints/acl_endpoint.rb
@@ -25,6 +25,10 @@ module ChefZero
def get(request)
path, perm = validate_request(request)
+ if path.size == 4 && path[3] == 'organization' && path[0] == 'organizations'
+ # Needs to be 405, but account returns 404
+ raise RestErrorResponse.new(404, "Object not found: #{build_uri(request.base_uri, request.rest_path)}")
+ end
acls = DataNormalizer.normalize_acls(get_acls(request, path), request.requestor)
json_response(200, { perm => acls[perm] })
end