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:
June Kelly 2022-01-12 09:53:41 +00:00 committed by Copybot
parent 0e2997a237
commit b5625fe3df
2 changed files with 12 additions and 6 deletions

View file

@ -63,14 +63,19 @@ function affiliateUserByReversedHostname(user, reversedHostname, callback) {
)
return innerCallback(error)
}
FeaturesUpdater.refreshFeatures(
user._id,
'affiliate-user-by-reversed-hostname',
innerCallback
)
innerCallback()
}
)
},
callback
err => {
if (err) {
return callback(err)
}
FeaturesUpdater.refreshFeatures(
user._id,
'affiliate-user-by-reversed-hostname',
callback
)
}
)
}

View file

@ -132,6 +132,7 @@ describe('InstitutionsController', function () {
this.refreshFeatures
.calledWith(this.stubbedUser2._id)
.should.equal(true)
this.refreshFeatures.should.have.been.calledTwice
return done()
}
this.next.callsFake(done)