Skip to content
Browse files

make v1 snapshots work over all visible services

Change-Id: I53349330fe7fe8aa871cd1d1d914e9375527d24c
  • Loading branch information...
1 parent 5df55ca commit f616666f1f3e0dded9798e0d0f80ddddbfed9dad Max Brunsfeld and Patrick Bozeman committed with pbozeman Feb 13, 2013
View
5 lib/cloud_controller/legacy_api/legacy_service_lifecycle.rb
@@ -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
View
2 spec/api/legacy_service_lifecycle_spec.rb
@@ -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,
),

0 comments on commit f616666

Please sign in to comment.
Something went wrong with that request. Please try again.