diff options
Diffstat (limited to 'routers/org/teams.go')
-rw-r--r-- | routers/org/teams.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go index 914561b52a..10c86bd5cf 100644 --- a/routers/org/teams.go +++ b/routers/org/teams.go @@ -88,6 +88,12 @@ func TeamsAction(ctx *context.Context) { return } + if u.IsOrganization() { + ctx.Flash.Error(ctx.Tr("form.cannot_add_org_to_team")) + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) + return + } + err = ctx.Org.Team.AddMember(u.ID) page = "team" } |