CB-2550 check that team is not granted yet (#1375)

This commit is contained in:
alex
2022-12-27 14:05:47 +01:00
committed by GitHub
parent 020f14b253
commit 40fb43e314
@@ -295,7 +295,9 @@ export class UserFormController implements IInitializableController, IDestructib
await this.usersResource.grantTeam(this.user.userId, teamId, true);
}
} else {
await this.usersResource.revokeTeam(this.user.userId, teamId, true);
if (this.user.grantedTeams.includes(teamId)) {
await this.usersResource.revokeTeam(this.user.userId, teamId, true);
}
}
}
}