Change team invitation acceptance to join all invited teams under the org
Fixes #1989
This commit is contained in:
parent
1c3012a538
commit
402ad25690
3 changed files with 119 additions and 12 deletions
|
@ -28,7 +28,8 @@ def permission_view(permission):
|
|||
def try_accept_invite(code, user):
|
||||
(team, inviter) = model.team.confirm_team_invite(code, user)
|
||||
|
||||
model.notification.delete_matching_notifications(user, 'org_team_invite', code=code)
|
||||
model.notification.delete_matching_notifications(user, 'org_team_invite',
|
||||
org=team.organization.username)
|
||||
|
||||
orgname = team.organization.username
|
||||
log_action('org_team_member_invite_accepted', orgname, {
|
||||
|
@ -208,6 +209,7 @@ class TeamMemberList(ApiResource):
|
|||
invites = model.team.get_organization_team_member_invites(team.id)
|
||||
|
||||
data = {
|
||||
'name': teamname,
|
||||
'members': [member_view(m) for m in members] + [invite_view(i) for i in invites],
|
||||
'can_edit': edit_permission.can()
|
||||
}
|
||||
|
|
Reference in a new issue