Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge "Send current user's guid in Gateway Provision request"

  • Loading branch information...
commit 226bcc54451158aa56b737d597e3c9876e3d37df 2 parents 796f230 + 2828173
Harshawardhan Gadgil authored Gerrit Code Review committed
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
Please sign in to comment.
Something went wrong with that request. Please try again.