Skip to content

Commit

Permalink
make v1 snapshots work over all visible services
Browse files Browse the repository at this point in the history
Change-Id: I53349330fe7fe8aa871cd1d1d914e9375527d24c
  • Loading branch information
Max Brunsfeld and Patrick Bozeman authored and pbozeman committed Feb 13, 2013
1 parent 5df55ca commit f616666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/cloud_controller/legacy_api/legacy_service_lifecycle.rb
Expand Up @@ -102,10 +102,7 @@ def data_file_path
def dispatch(op, gateway_name, *args)
# FIXME: should really be unauthenticated
raise NotAuthorized unless user
@service_instance = Models::ServiceInstance[
:gateway_name => gateway_name,
:space => default_space,
]
@service_instance = Models::ServiceInstance.user_visible[:gateway_name => gateway_name]
raise ServiceInstanceNotFound, gateway_name unless service_instance
json_message = super
# maybe this .encode fits better in the methods so that it's more explicit
Expand Down
2 changes: 1 addition & 1 deletion spec/api/legacy_service_lifecycle_spec.rb
Expand Up @@ -30,7 +30,7 @@ module VCAP::CloudController
Models::ServiceInstance.make(
:gateway_name => "lifecycle",
:name => "bar",
:space => @user.default_space,
:space => make_space_for_user(@user),
:service_plan => Models::ServicePlan.make(
:service => service,
),
Expand Down

0 comments on commit f616666

Please sign in to comment.