mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-04 12:16:51 +00:00
[web] Fix UpgradePrompt in Editor - Retrieve isMember
from userIsMemberOfGroupSubscription
(#19810)
* Fix: Retrieve `isMember` from `userIsMemberOfGroupSubscription` * Inline `userIsMemberOfGroupSubscription` call GitOrigin-RevId: b8b339bbce3934b0b83bf6d805ab6ef6225d43e7
This commit is contained in:
parent
2113a94aff
commit
a278e70b27
2 changed files with 7 additions and 4 deletions
|
@ -415,9 +415,12 @@ const _ProjectController = {
|
|||
collaberator_refs: 1, // used for link sharing analytics
|
||||
}),
|
||||
userIsMemberOfGroupSubscription: sessionUser
|
||||
? LimitationsManager.promises.userIsMemberOfGroupSubscription(
|
||||
sessionUser
|
||||
)
|
||||
? (async () =>
|
||||
(
|
||||
await LimitationsManager.promises.userIsMemberOfGroupSubscription(
|
||||
sessionUser
|
||||
)
|
||||
).isMember)()
|
||||
: false,
|
||||
_flushToTpds:
|
||||
TpdsProjectFlusher.promises.flushProjectToTpdsIfNeeded(projectId),
|
||||
|
|
|
@ -994,7 +994,7 @@ describe('ProjectController', function () {
|
|||
it('should not show for a user who is a member of a group subscription', function (done) {
|
||||
this.LimitationsManager.promises.userIsMemberOfGroupSubscription = sinon
|
||||
.stub()
|
||||
.resolves(true)
|
||||
.resolves({ isMember: true })
|
||||
this.res.render = (pageName, opts) => {
|
||||
expect(opts.showUpgradePrompt).to.equal(false)
|
||||
done()
|
||||
|
|
Loading…
Reference in a new issue