diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 61b00d793b..f815171ac5 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -405,19 +405,6 @@ func CollaborationPost(ctx *context.Context) { return } - // Check if user is organization member. - if ctx.Repo.Owner.IsOrganization() { - isMember, err := ctx.Repo.Owner.IsOrgMember(u.ID) - if err != nil { - ctx.ServerError("IsOrgMember", err) - return - } else if isMember { - ctx.Flash.Info(ctx.Tr("repo.settings.user_is_org_member")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - } - if got, err := ctx.Repo.Repository.IsCollaborator(u.ID); err == nil && got { ctx.Flash.Error(ctx.Tr("repo.settings.add_collaborator_duplicate")) ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") |