Skip to content
Browse files

Send current user's guid in Gateway Provision request

- Bump vcap-common (required for updated gateway provision request)

  git shortlog b9024a52..055964f622

  Dr Nic Williams (1):
      VCAP::Component.register returns its configuration

  Harshawardhan Gadgil (1):
      Add (optional) user guid and space guid to gateway provision request

Change-Id: I3ad8827c9d5ef0e017fde34d58c2baf10ee8ac21
  • Loading branch information...
1 parent ffa9082 commit 282817372a201b1ff92041c824d09505a1a8e149 Harshawardhan Gadgil committed Jan 23, 2013
Showing with 11 additions and 6 deletions.
  1. +1 −1 Gemfile
  2. +4 −4 Gemfile.lock
  3. +2 −1 lib/cloud_controller/models/service_instance.rb
  4. +4 −0 lib/cloud_controller/security_context.rb
View
2 Gemfile
@@ -11,7 +11,7 @@ gem "sinatra-contrib"
gem "yajl-ruby"
gem 'vcap-concurrency', :git => 'git://github.com/cloudfoundry/vcap-concurrency.git'
gem "membrane", "~> 0.0.2"
-gem "vcap_common", "~> 2.0.8", :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b9024a52'
+gem "vcap_common", "~> 2.0.8", :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => '055964f622'
gem "cf-uaa-lib", "~> 1.3.0"
gem "httpclient"
gem "steno", "~> 1.0.0"
View
8 Gemfile.lock
@@ -1,7 +1,7 @@
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b9024a52348223b146ce51126486e88816fa03f4
- ref: b9024a52
+ revision: 055964f62282c94ebe7c3ce6f4df9fb093a17714
+ ref: 055964f622
specs:
vcap_common (2.0.10)
em-http-request (~> 1.0.0.beta3, < 1.0.0.beta4)
@@ -53,8 +53,8 @@ GEM
em-socksify
eventmachine
http_parser.rb (>= 0.5.1)
- em-socksify (0.1.0)
- eventmachine
+ em-socksify (0.2.1)
+ eventmachine (>= 1.0.0.beta.4)
eventmachine (1.0.0)
grape (0.2.2)
activesupport
View
3 lib/cloud_controller/models/service_instance.rb
@@ -156,7 +156,8 @@ def provision_on_gateway
:email => VCAP::CloudController::SecurityContext.current_user_email,
:plan => service_plan.name,
:plan_option => {}, # TODO: remove this
- :version => service_plan.service.version
+ :version => service_plan.service.version,
+ :user_guid => VCAP::CloudController::SecurityContext.current_user_guid
)
logger.debug "provision response for instance #{guid} #{gw_attrs.inspect}"
View
4 lib/cloud_controller/security_context.rb
@@ -36,6 +36,10 @@ def self.current_user_email
return token['email'] if token
end
+ def self.current_user_guid
+ return token['user_id'] if token
+ end
+
def self.current_user_has_email?(email)
current_user_email && current_user_email.downcase == email.downcase
end

0 comments on commit 2828173

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