[web] Ignore reuable invites (aka sharing links) when checking edit invite count GitOrigin-RevId: 355ec6e6b2d5d497392fe1bdc04e68ad80349518
@@ -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' },
})
expect(count).to.equal(2)