mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Display error when adding a user to a team twice (#4746)
This commit is contained in:
1 parent
b1ad5734c6
commit
a6cdda115d
2 files changed
+7
-1
No files matched your search
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user