From 10b93efc4a3061d01b75b44b91a617698971e38b Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 24 Feb 2017 13:56:02 -0500 Subject: repo: able to add organization member as repository collaborator --- routers/repo/setting.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'routers/repo/setting.go') 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 -- cgit v1.2.3