diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 7cafe3e3..0dca950a 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -320,20 +320,13 @@ func SettingsCollaborationPost(ctx *context.Context) { return } - // Organization is not allowed to be added as a collaborator. + // Organization is not allowed to be added as a collaborator if u.IsOrganization() { ctx.Flash.Error(ctx.Tr("repo.settings.org_not_allowed_to_be_collaborator")) ctx.Redirect(setting.AppSubUrl + ctx.Req.URL.Path) return } - // Check if user is organization member. - if ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOrgMember(u.ID) { - ctx.Flash.Info(ctx.Tr("repo.settings.user_is_org_member")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - if err = ctx.Repo.Repository.AddCollaborator(u); err != nil { ctx.Handle(500, "AddCollaborator", err) return |