Merge pull request #19626 from overleaf/ii-invite-remove-unncecessary-fields

[web] Clean up props exposed to the /invite and /invites endpoints

GitOrigin-RevId: dc4163e04d5785e141d5e322bfb0a626e67d637f
This commit is contained in:
ilkin-overleaf
2024-08-09 15:51:41 +03:00
committed by Copybot
parent 7853032975
commit bf8078075f
6 changed files with 76 additions and 77 deletions
@@ -218,7 +218,9 @@ describe('ProjectEditorHandler', function () {
it('should include invites', function () {
expect(this.result.invites).to.exist
this.result.invites.should.deep.equal(
this.invites.map(invite => _.omit(invite, 'token'))
this.invites.map(invite =>
_.pick(invite, ['_id', 'email', 'privileges'])
)
)
})