Merge pull request #2713 from overleaf/jpa-custom-wsurl-for-beta-users

[misc] custom wsUrl for beta users

GitOrigin-RevId: e731ae7245e9c5586ae82cbc4c6716a74e56f2c9
This commit is contained in:
Jakob Ackermann
2020-04-03 03:20:47 +00:00
committed by Copybot
parent 50d715ea5d
commit 155b22caf9
9 changed files with 109 additions and 15 deletions
@@ -66,6 +66,7 @@ module.exports = LaunchpadController = {
}
if (user && user.isAdmin) {
return res.render(Path.resolve(__dirname, '../views/launchpad'), {
wsUrl: Settings.wsUrl,
adminUserExists,
authMethod
})
@@ -9,7 +9,7 @@ block content
authMethod: "!{authMethod}"
}
script(type="text/javascript" src='/socket.io/socket.io.js')
script(type="text/javascript" src=(wsUrl || '/socket.io') + '/socket.io.js')
style.
hr { margin-bottom: 5px; }
@@ -171,6 +171,7 @@ describe('LaunchpadController', function() {
this.res.render.callCount.should.equal(1)
return this.res.render
.calledWith(viewPath, {
wsUrl: undefined,
adminUserExists: true,
authMethod: 'local'
})