summaryrefslogtreecommitdiffstats
path: root/routers/org/teams.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/org/teams.go')
-rw-r--r--routers/org/teams.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go
index 87bfb8596a..da6d81938a 100644
--- a/routers/org/teams.go
+++ b/routers/org/teams.go
@@ -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"
}