mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 12:22:11 +00:00
fix bug to deny to add orgnization as a member of an orgnization or team (#1815)
This commit is contained in:
parent
39348cd27e
commit
3611a3e552
3 changed files with 14 additions and 0 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue