mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
Merge pull request #34639 from overleaf/as-link-sharing-editinvitecount
[web] Ignore reuable invites (aka sharing links) when checking edit invite count GitOrigin-RevId: 355ec6e6b2d5d497392fe1bdc04e68ad80349518
This commit is contained in:
@@ -23,6 +23,7 @@ async function getEditInviteCount(projectId) {
|
||||
const count = await ProjectInvite.countDocuments({
|
||||
projectId,
|
||||
privileges: { $ne: PrivilegeLevels.READ_ONLY },
|
||||
reusable: { $ne: true },
|
||||
}).exec()
|
||||
return count
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ describe('CollaboratorsInviteGetter', function () {
|
||||
expect(ctx.ProjectInvite.countDocuments).to.be.calledWith({
|
||||
projectId: ctx.projectId,
|
||||
privileges: { $ne: 'readOnly' },
|
||||
reusable: { $ne: true },
|
||||
})
|
||||
expect(count).to.equal(2)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user