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:
MoxAmber
2026-06-18 08:06:44 +00:00
committed by Copybot
parent bd8a156908
commit a7a3ccdb71
2 changed files with 2 additions and 0 deletions
@@ -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)
})