mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #6227 from overleaf/jpa-de-dupe-feature-refresh
[web] when confirming institution domain, refresh features once per user GitOrigin-RevId: 3855441848cf0b140a6cf0264b887d8eca7db5ad
This commit is contained in:
parent
0e2997a237
commit
b5625fe3df
2 changed files with 12 additions and 6 deletions
|
@ -63,14 +63,19 @@ function affiliateUserByReversedHostname(user, reversedHostname, callback) {
|
||||||
)
|
)
|
||||||
return innerCallback(error)
|
return innerCallback(error)
|
||||||
}
|
}
|
||||||
FeaturesUpdater.refreshFeatures(
|
innerCallback()
|
||||||
user._id,
|
|
||||||
'affiliate-user-by-reversed-hostname',
|
|
||||||
innerCallback
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
callback
|
err => {
|
||||||
|
if (err) {
|
||||||
|
return callback(err)
|
||||||
|
}
|
||||||
|
FeaturesUpdater.refreshFeatures(
|
||||||
|
user._id,
|
||||||
|
'affiliate-user-by-reversed-hostname',
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,7 @@ describe('InstitutionsController', function () {
|
||||||
this.refreshFeatures
|
this.refreshFeatures
|
||||||
.calledWith(this.stubbedUser2._id)
|
.calledWith(this.stubbedUser2._id)
|
||||||
.should.equal(true)
|
.should.equal(true)
|
||||||
|
this.refreshFeatures.should.have.been.calledTwice
|
||||||
return done()
|
return done()
|
||||||
}
|
}
|
||||||
this.next.callsFake(done)
|
this.next.callsFake(done)
|
||||||
|
|
Loading…
Reference in a new issue