diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2018-08-19 19:49:19 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-08-19 21:49:19 +0300 |
commit | a6cdda115d6fecabea9406c3dd630087be49f437 (patch) | |
tree | e8049142479e5c16a3923e03b1c70d997ad134f5 /routers/org/teams.go | |
parent | b1ad5734c69025a85e3ed618576fc0160de9ce22 (diff) | |
download | gitea-a6cdda115d6fecabea9406c3dd630087be49f437.tar.gz gitea-a6cdda115d6fecabea9406c3dd630087be49f437.zip |
Display error when adding a user to a team twice (#4746)
Diffstat (limited to 'routers/org/teams.go')
-rw-r--r-- | routers/org/teams.go | 7 |
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" } |