[web] Upgrade restricted user access if they are invited members (#9401)

* [web] Upgrade restricted user access if they are invited members

Previously, if a user joined a project via a read-only link and later on
joined the project via an invite, we would still treat them as
restricted users, disabling chat and commenting. This patch changes
that, so that we do *not* consider an invited user restricted.

GitOrigin-RevId: e2acdfd29cc0687cb7276310a9c96d697087b21a
This commit is contained in:
Mathias Jakobsen
2022-09-27 12:23:36 +01:00
committed by Copybot
parent 855adb73ef
commit b5e2604041
7 changed files with 55 additions and 15 deletions
@@ -96,6 +96,7 @@ describe('ProjectController', function () {
}
this.CollaboratorsGetter = {
userIsTokenMember: sinon.stub().callsArgWith(2, null, false),
isUserInvitedMemberOfProject: sinon.stub().callsArgWith(2, null, true),
}
this.ProjectEntityHandler = {}
this.NotificationBuilder = {
@@ -1014,6 +1015,7 @@ describe('ProjectController', function () {
})
it('should add isRestrictedTokenMember', function (done) {
this.AuthorizationManager.isRestrictedUser.returns(false)
this.res.render = (pageName, opts) => {
opts.isRestrictedTokenMember.should.exist
opts.isRestrictedTokenMember.should.equal(false)