Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@ teams.search_repo_placeholder = Search repository…
teams.add_team_repository = Add Team Repository
teams.remove_repo = Remove
teams.add_nonexistent_repo = "The repository you're trying to add does not exist; please create it first."
teams.add_duplicate_users = User is already a team member.

[admin]
dashboard = Dashboard
Expand Down
7 changes: 6 additions & 1 deletion routers/org/teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ func TeamsAction(ctx *context.Context) {
return
}

err = ctx.Org.Team.AddMember(u.ID)
if ctx.Org.Team.IsMember(u.ID) {
ctx.Flash.Error(ctx.Tr("org.teams.add_duplicate_users"))
} else {
err = ctx.Org.Team.AddMember(u.ID)
}

page = "team"
}

Expand Down