File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1312,6 +1312,7 @@ teams.search_repo_placeholder = Search repository…
1312
1312
teams.add_team_repository = Add Team Repository
1313
1313
teams.remove_repo = Remove
1314
1314
teams.add_nonexistent_repo = "The repository you' re trying to add does not exist; please create it first."
1315
+ teams.add_duplicate_users = User is already a team member.
1315
1316
1316
1317
[admin]
1317
1318
dashboard = Dashboard
Original file line number Diff line number Diff line change @@ -96,7 +96,12 @@ func TeamsAction(ctx *context.Context) {
96
96
return
97
97
}
98
98
99
- err = ctx .Org .Team .AddMember (u .ID )
99
+ if ctx .Org .Team .IsMember (u .ID ) {
100
+ ctx .Flash .Error (ctx .Tr ("org.teams.add_duplicate_users" ))
101
+ } else {
102
+ err = ctx .Org .Team .AddMember (u .ID )
103
+ }
104
+
100
105
page = "team"
101
106
}
102
107
You can’t perform that action at this time.
0 commit comments