Commit 1c67d96d63d972164bc507740914b23fd140ca4f
1 parent
0ce73152
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
oauth_client: setup multitenancy in omniauth setup phase
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
plugins/oauth_client/lib/oauth_client_plugin.rb
| ... | ... | @@ -50,9 +50,10 @@ class OauthClientPlugin < Noosfero::Plugin |
| 50 | 50 | Rails.application.config.middleware.use OmniAuth::Builder do |
| 51 | 51 | PROVIDERS.each do |provider, options| |
| 52 | 52 | setup = lambda { |env| |
| 53 | - request = Rack::Request.new env | |
| 53 | + request = Rack::Request.new(env) | |
| 54 | 54 | strategy = env['omniauth.strategy'] |
| 55 | 55 | |
| 56 | + Noosfero::MultiTenancy.setup!(request.host) | |
| 56 | 57 | domain = Domain.find_by_name(request.host) |
| 57 | 58 | environment = domain.environment rescue Environment.default |
| 58 | 59 | ... | ... |