forked from External/greenlight
GRN-80: Allow local accounts on multitenant (#428)
* Changed the way the omniauth providers are declared * Allow local authentication for multitenant mode based on customer settings * Cleanead up code mandated by rubocop * Completed implementation for signin and added the one for signup * Fixed issue with rubocop * Renamed customer_name to lb_user * Renamed lb_user -> user_domain, fixed issue with signup controller, email verification WAS NOT implemented * Completed implementation of email_verification * Fixed rubocop issue * Final update * Fix for test with loadbalancer * Make sure loadbalancer mockup is only used when env defined * Fix for test on rooms_controller * Fixed most of the test failing on multitenant env * Fixed issue detected by rubocop * Fixed issue with activation tockens not working on resend * Fixed new issue found by rubocop * Updated travis script * Harcoded credentials for mockup * Updated expectation on start_session * Fixed issue with duplication of home room * Updated script for rubocop * Restored Gemfile
This commit is contained in:
@ -47,7 +47,7 @@ RSpec.configure do |config|
|
||||
# external servers, api stubbing is used to simulate external server
|
||||
# responses
|
||||
config.before(:each) do
|
||||
stub_request(:any, /#{ENV['BIGBLUEBUTTON_ENDPOINT']}/)
|
||||
stub_request(:any, /#{"http:\/\/bbb.example.com\/bigbluebutton\/api"}/)
|
||||
.with(
|
||||
headers:
|
||||
{
|
||||
@ -57,7 +57,7 @@ RSpec.configure do |config|
|
||||
}
|
||||
)
|
||||
.to_return(status: 200, body: "", headers: {})
|
||||
stub_request(:any, /#{ENV['LOADBALANCER_ENDPOINT']}/)
|
||||
stub_request(:any, /#{ENV['LOADBALANCER_ENDPOINT'] + 'api'}/)
|
||||
.with(
|
||||
headers:
|
||||
{
|
||||
@ -66,8 +66,8 @@ RSpec.configure do |config|
|
||||
'User-Agent': 'Ruby',
|
||||
}
|
||||
)
|
||||
.to_return(status: 200, body: "", headers: {})
|
||||
stub_request(:any, /#{ENV['LOADBALANCER_ENDPOINT'] + 'getUser'}/)
|
||||
.to_return(status: 200, body: "", headers: {}) if ENV['LOADBALANCER_ENDPOINT']
|
||||
stub_request(:any, /#{ENV['LOADBALANCER_ENDPOINT'] + 'api\/getUser'}/)
|
||||
.with(
|
||||
headers:
|
||||
{
|
||||
@ -83,8 +83,26 @@ RSpec.configure do |config|
|
||||
<user>
|
||||
<name>greenlight</name>
|
||||
<maxMeetings>1000</maxMeetings>
|
||||
<apiURL>#{ENV['LOADBALANCER_ENDPOINT']}</apiURL>
|
||||
<secret>#{ENV['LOADBALANCER_SECRET']}</secret>
|
||||
<apiURL>http:\/\/bbb.example.com\/bigbluebutton\/api</apiURL>
|
||||
<secret>secret</secret>
|
||||
</user>
|
||||
</response>", headers: {}) if ENV['LOADBALANCER_ENDPOINT']
|
||||
stub_request(:any, /#{ENV['LOADBALANCER_ENDPOINT'] + 'api2\/getUserGreenlightCredentials'}/)
|
||||
.with(
|
||||
headers:
|
||||
{
|
||||
'Accept': '*/*',
|
||||
'Accept-Encoding': 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
||||
'User-Agent': 'Ruby',
|
||||
}
|
||||
)
|
||||
.to_return(status: 200, body: "
|
||||
<response>
|
||||
<version>2.0</version>
|
||||
<returncode>SUCCESS</returncode>
|
||||
<user>
|
||||
<provider>greenlight</provider>
|
||||
<GOOGLE_HD/>
|
||||
</user>
|
||||
</response>", headers: {}) if ENV['LOADBALANCER_ENDPOINT']
|
||||
end
|
||||
|
Reference in New Issue
Block a user